Skip to content

Commit

Permalink
feat: ignore NotFound error for setting agentVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewkeil committed Jan 30, 2024
1 parent 6adbd27 commit e8be145
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/beacon-node/src/network/peers/peerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,10 @@ export class PeerManager {
},
{retries: 3, retryDelay: 1000}
).catch((err) => {
this.logger.error("Error setting agentVersion for the peer", {peerId: peerData.peerId.toString()}, err);
// Ignore Not Found error if peer was disconnected
if (err instanceof Error && !err.message.includes("NotFound")) {
this.logger.error("Error setting agentVersion for the peer", {peerId: peerData.peerId.toString()}, err);
}
});
};

Expand Down

0 comments on commit e8be145

Please sign in to comment.