diff --git a/packages/bitswap/src/peer-want-lists/ledger.ts b/packages/bitswap/src/peer-want-lists/ledger.ts index acc15da2e..f41d6946d 100644 --- a/packages/bitswap/src/peer-want-lists/ledger.ts +++ b/packages/bitswap/src/peer-want-lists/ledger.ts @@ -125,7 +125,10 @@ export class Ledger { }) } } catch (err: any) { - if (err.code !== 'ERR_NOT_FOUND') { + if ( + (err.code !== undefined && err.code !== 'ERR_NOT_FOUND') || + (err.name !== undefined && err.name !== 'NotFoundError') + ) { throw err }