Skip to content

Commit

Permalink
fix: tolerant of failure for deals
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Dec 9, 2021
1 parent c9f6c06 commit 89f4401
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/db/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,9 @@ export class DBClient {
}

/**
* Get deals for multiple cids
* Get deals for multiple cids. This function is error tolerant as it uses
* the dagcargo FDW. It will return an empty object if any error is
* encountered fetching the data.
*
* @param {string[]} cids
* @return {Promise<Record<string, import('./db-client-types').Deal[]>>}
Expand All @@ -561,7 +563,7 @@ export class DBClient {
})

if (error) {
throw new DBError(error)
return {}
}

const result = {}
Expand Down

0 comments on commit 89f4401

Please sign in to comment.