Skip to content

Commit 82d87f2

Browse files
authored
FailFastSecurityError check bug (#1329)
* handle getting a non-neo4j error * wrap browser write error
1 parent 2baf9dd commit 82d87f2

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/bolt-connection/src/channel/browser/browser-channel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export default class WebSocketChannel {
151151
this._handleConnectionError()
152152
} else {
153153
// Some other error occured
154-
throw error
154+
throw newError('unexpected failure to write.', undefined, error)
155155
}
156156
}
157157
} else {

packages/bolt-connection/src/connection-provider/connection-provider-routing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ function _isFailFastError (error) {
817817
}
818818

819819
function _isFailFastSecurityError (error) {
820-
return error.code.startsWith('Neo.ClientError.Security.') &&
820+
return error.code?.startsWith('Neo.ClientError.Security.') &&
821821
![
822822
AUTHORIZATION_EXPIRED_CODE
823823
].includes(error.code)

packages/neo4j-driver-deno/lib/bolt-connection/channel/browser/browser-channel.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/neo4j-driver-deno/lib/bolt-connection/connection-provider/connection-provider-routing.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)