From 473a445d31a87213e01f96a2fe44463732fc0ed2 Mon Sep 17 00:00:00 2001 From: Matthew Keil Date: Wed, 31 Jan 2024 03:46:28 -0500 Subject: [PATCH] fix: remove NotFound check and only debug log error setting agentVersion Co-authored-by: Nico Flaig --- packages/beacon-node/src/network/peers/peerManager.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/beacon-node/src/network/peers/peerManager.ts b/packages/beacon-node/src/network/peers/peerManager.ts index 5437bfaa15f9..2275178e13e3 100644 --- a/packages/beacon-node/src/network/peers/peerManager.ts +++ b/packages/beacon-node/src/network/peers/peerManager.ts @@ -619,13 +619,8 @@ export class PeerManager { } }, {retries: 3, retryDelay: 1000} - ).catch((err: Error) => { - if (err.message.includes("NotFound")) { - return this.logger.debug("Peer not found when attempting to set agentVersion", { - peerId: peerData.peerId.toString(), - }); - } - this.logger.error("Error setting agentVersion for the peer", {peerId: peerData.peerId.toString()}, err); + ).catch((err) => { + this.logger.debug("Error setting agentVersion for the peer", {peerId: peerData.peerId.toString()}, err); }); };