diff --git a/src/v1/error.js b/src/v1/error.js index d471434b3..9ba5efee2 100644 --- a/src/v1/error.js +++ b/src/v1/error.js @@ -44,6 +44,7 @@ class Neo4jError extends Error { super( message ); this.message = message; this.code = code; + this.name = "Neo4jError" } } diff --git a/test/internal/connector.test.js b/test/internal/connector.test.js index c7852c999..ba4889a9f 100644 --- a/test/internal/connector.test.js +++ b/test/internal/connector.test.js @@ -233,6 +233,7 @@ describe('connector', () => { expect(() => { throw error; }).toThrow(new Neo4jError(expectedMessage, expectedCode)); + expect(error.name).toBe("Neo4jError"); } function basicAuthToken() {