Skip to content

Commit

Permalink
fix: only log when data is invalid (#2862)
Browse files Browse the repository at this point in the history
Only log an error when parsing peer data fails, not when it is not
present.
  • Loading branch information
achingbrain authored Nov 29, 2024
1 parent 0f87479 commit a0c8ceb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/peer-store/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ export class PersistentStore {
existingBuf,
existingPeer
}
} catch (err) {
this.log.error('invalid peer data found in peer store - %e', err)
} catch (err: any) {
if (err.name !== 'NotFoundError') {
this.log.error('invalid peer data found in peer store - %e', err)
}
}

return {}
Expand Down

0 comments on commit a0c8ceb

Please sign in to comment.