diff --git a/web3.js/src/connection.ts b/web3.js/src/connection.ts index 3e4d4d1d38011a..2a71a2c8ee94a5 100644 --- a/web3.js/src/connection.ts +++ b/web3.js/src/connection.ts @@ -4847,7 +4847,7 @@ export class Connection { try { this.removeSignatureListener(clientSubscriptionId); // eslint-disable-next-line no-empty - } catch { + } catch (_err) { // Already removed. } } @@ -4895,7 +4895,7 @@ export class Connection { try { this.removeSignatureListener(clientSubscriptionId); // eslint-disable-next-line no-empty - } catch { + } catch (_err) { // Already removed. } }, diff --git a/web3.js/test/connection.test.ts b/web3.js/test/connection.test.ts index 87ddfcfcedaa91..7cec3824f4f8e5 100644 --- a/web3.js/test/connection.test.ts +++ b/web3.js/test/connection.test.ts @@ -3614,7 +3614,7 @@ describe('Connection', function () { await connection._rpcWebSocket.notify('ping'); break; // eslint-disable-next-line no-empty - } catch {} + } catch (_err) {} await sleep(100); } });