Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/dips/src/ipfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl IpfsFetcher for IpfsClient {
.map_ok(|chunk| chunk.to_vec())
.try_concat()
.await
.unwrap();
.map_err(|_| DipsError::SubgraphManifestUnavailable(file.to_string()))?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be worth logging the error here so we can see why it failed


let manifest: GraphManifest = serde_yaml::from_slice(&content)
.map_err(|_| DipsError::InvalidSubgraphManifest(file.to_string()))?;
Expand Down
2 changes: 2 additions & 0 deletions crates/dips/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ pub enum DipsError {
PayerNotAuthorised(Address),
#[error("voucher payee {actual} does not match the expected address {expected}")]
UnexpectedPayee { expected: Address, actual: Address },
#[error("cannot get subgraph manifest for {0}")]
SubgraphManifestUnavailable(String),
#[error("invalid subgraph id {0}")]
InvalidSubgraphManifest(String),
#[error("voucher for chain id {0}, subgraph manifest has network {1}")]
Expand Down
Loading