Skip to content

Commit 786528c

Browse files
committed
fix neo4jerror name issue
1 parent b0ccd38 commit 786528c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/v1/error.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class Neo4jError extends Error {
4444
super( message );
4545
this.message = message;
4646
this.code = code;
47+
this.name = "Neo4jError"
4748
}
4849
}
4950

test/internal/connector.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ describe('connector', () => {
233233
expect(() => {
234234
throw error;
235235
}).toThrow(new Neo4jError(expectedMessage, expectedCode));
236+
expect(error.name).toBe("Neo4jError");
236237
}
237238

238239
function basicAuthToken() {

0 commit comments

Comments
 (0)