Skip to content

Commit

Permalink
fix: don't throw ipfs errors, use defaults (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
wgwz authored Sep 13, 2023
1 parent 85d6bcc commit 71ecb09
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/api/ipfs.actions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { create as createIpfsClient } from 'ipfs-http-client'

import { throwError } from 'util/errors'
import { isJson } from 'util/validation'

const client = createIpfsClient({
Expand All @@ -20,6 +19,6 @@ export async function fetchIpfsData(cid: string) {
const dataStr = data.toString()
return isJson(dataStr) ? JSON.parse(dataStr) : dataStr
} catch (error) {
throwError(error)
console.log({ error, cid, message: 'unable to fetch ipfs data' })
}
}

0 comments on commit 71ecb09

Please sign in to comment.