Skip to content

Commit 56506b5

Browse files
committed
fix propagate error when no value or default available
1 parent c7e58dd commit 56506b5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

subxt/src/storage/storage_client_at.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ async fn fetch<'atblock, T: Config, Client: OnlineClientT<T>, Addr: Address>(
324324
let value = try_fetch(entry, client, block_hash, key_parts)
325325
.await?
326326
.or_else(|| entry.default_value())
327-
.unwrap();
327+
.ok_or(StorageError::NoValueFound)?;
328328

329329
Ok(value)
330330
}

0 commit comments

Comments
 (0)