Skip to content

Commit

Permalink
[audit] Handle errors when fetching storage keys from Unstablebackend (
Browse files Browse the repository at this point in the history
…#1440)

* Handle errors when fetching storage keys from Unstablebackend

* cargo fmt
  • Loading branch information
jsdw authored Feb 23, 2024
1 parent 4614ff7 commit 6f63ded
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions subxt/src/backend/unstable/storage_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@ impl<T: Config> Stream for StorageItems<T> {
self.buffered_responses = items.items;
continue;
}
FollowEvent::OperationError(err) if err.operation_id == *self.operation_id => {
// Something went wrong obtaining storage items; mark as done and return the error.
self.done = true;
return Poll::Ready(Some(Err(Error::Other(err.error))));
}
_ => {
// We don't care about this event; wait for the next.
continue;
Expand Down

0 comments on commit 6f63ded

Please sign in to comment.