From d0d89c4621fa511491b7b0abe56a5223ebf9eebb Mon Sep 17 00:00:00 2001 From: Antonio Barcelos Date: Thu, 28 Oct 2021 18:19:44 +0200 Subject: [PATCH 1/2] Connection errors should be thrown with the root cause --- bolt-connection/src/bolt/bolt-protocol-v1.js | 4 ++++ bolt-connection/src/bolt/response-handler.js | 4 ++++ bolt-connection/src/connection/connection-channel.js | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bolt-connection/src/bolt/bolt-protocol-v1.js b/bolt-connection/src/bolt/bolt-protocol-v1.js index 53a03b1af..1497118f2 100644 --- a/bolt-connection/src/bolt/bolt-protocol-v1.js +++ b/bolt-connection/src/bolt/bolt-protocol-v1.js @@ -84,6 +84,10 @@ export default class BoltProtocol { return BOLT_PROTOCOL_V1 } + get currentFailure () { + return this._responseHandler.currentFailure + } + /** * Get the packer. * @return {Packer} the protocol's packer. diff --git a/bolt-connection/src/bolt/response-handler.js b/bolt-connection/src/bolt/response-handler.js index 15d65cfc3..e12bdf4df 100644 --- a/bolt-connection/src/bolt/response-handler.js +++ b/bolt-connection/src/bolt/response-handler.js @@ -146,6 +146,10 @@ export default class ResponseHandler { } } + get currentFailure () { + return this._currentFailure + } + /* * Pop next pending observer form the list of observers and make it current observer. * @protected diff --git a/bolt-connection/src/connection/connection-channel.js b/bolt-connection/src/connection/connection-channel.js index 479765e77..c30609705 100644 --- a/bolt-connection/src/connection/connection-channel.js +++ b/bolt-connection/src/connection/connection-channel.js @@ -270,7 +270,7 @@ export default class ChannelConnection extends Connection { */ _handleFatalError (error) { this._isBroken = true - this._error = this.handleAndTransformError(error, this._address) + this._error = this.handleAndTransformError(this._protocol.currentFailure || error, this._address) if (this._log.isErrorEnabled()) { this._log.error( From b737ebe52d7ea6e4a0c6e1f6985fc445be0b5d08 Mon Sep 17 00:00:00 2001 From: Antonio Barcelos Date: Tue, 2 Nov 2021 09:55:58 +0100 Subject: [PATCH 2/2] Keep npm version as 7 --- testkit/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testkit/Dockerfile b/testkit/Dockerfile index 247a09694..cb9daef57 100644 --- a/testkit/Dockerfile +++ b/testkit/Dockerfile @@ -14,7 +14,7 @@ RUN apt-get update && \ firefox \ && rm -rf /var/lib/apt/lists/* -RUN npm install -g npm \ +RUN npm install -g npm@7 \ && /bin/bash -c 'hash -d npm' RUN npm install -g gulp