Skip to content

Commit

Permalink
Unknown lookup status of a path in certificate yields AgentError
Browse files Browse the repository at this point in the history
  • Loading branch information
mraszyk committed Aug 3, 2023
1 parent 6d923cb commit d3a9d4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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 path in a certificate results in an `AgentError` (the IC returns `Absent` for non-existing paths).

## [0.25.0] - 2023-07-05

* Breaking Change: builders are now owning-style rather than borrowing-style; with_arg takes an owned Vec rather than a borrowed Vec
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)),
LookupResult::Found(status) => match from_utf8(status)? {
"done" => Ok(RequestStatusResponse::Done),
"processing" => Ok(RequestStatusResponse::Processing),
Expand Down

0 comments on commit d3a9d4c

Please sign in to comment.