Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Unknown lookup status of a path in certificate yields AgentError #453

Merged
merged 8 commits into from
Sep 11, 2023
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

* The `Unknown` lookup of a request_status path in a certificate results in an `AgentError` (the IC returns `Absent` for non-existing paths).

## [0.27.0] - 2023-08-30

* Breaking change: Remove argument builder form `ic-utils`. `CallBuilder::with_arg` sets a single argument, instead of pushing a new argument to the list. This function can be called at most once. If it's called multiple times, it panics. If you have multiple arguments, use `CallBuilder::with_args((arg1, arg2))` or `CallBuilder::set_raw_arg(candid::Encode!(arg1, arg2)?)`.
Expand Down
2 changes: 1 addition & 1 deletion ic-agent/src/agent/response_authentication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub(crate) fn lookup_request_status<Storage: AsRef<[u8]>>(
];
match certificate.tree.lookup_path(&path_status) {
LookupResult::Absent => Ok(RequestStatusResponse::Unknown),
LookupResult::Unknown => Ok(RequestStatusResponse::Unknown),
LookupResult::Unknown => Err(LookupPathUnknown(path_status.to_vec())),
mraszyk marked this conversation as resolved.
Show resolved Hide resolved
LookupResult::Found(status) => match from_utf8(status)? {
"done" => Ok(RequestStatusResponse::Done),
"processing" => Ok(RequestStatusResponse::Processing),
Expand Down
Loading