Skip to content

[5.x] Fix undocumented members on GQLErrors and Neo4jErrors #1306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/esdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"enable": true
},
"brand": {
"title": "Neo4j Bolt Driver 4.1 for JavaScript",
"title": "Neo4j Bolt Driver 6.x for JavaScript",
"repository": "https://github.com/neo4j/neo4j-javascript-driver"
}
}
Expand Down
26 changes: 26 additions & 0 deletions packages/core/src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ class GQLError extends Error {
* @public
*/
this.rawClassification = diagnosticRecord?._classification ?? undefined
/**
* Represents the name for the type of error, inherited from base JavaScript {@link Error}.
* Will be 'GQLError' for {@link GQLError}s and 'Neo4jError' for {@link Neo4jError}s.
*
* @type {string}
* @public
*/
this.name = 'GQLError'
}

Expand All @@ -171,6 +178,11 @@ class Neo4jError extends GQLError {
* Optional error code. Will be populated when error originates in the database.
*/
code: string

/**
* Whether the request that caused this error can be safely retried without duplicate commits on the server.
* This does not apply when running auto-commit transactions using {@link Session#run}
*/
retriable: boolean

/**
Expand All @@ -195,7 +207,21 @@ class Neo4jError extends GQLError {
*/
this.code = code

/**
* The name of the type of error.
*
* @type {string}
* @public
*/
this.name = 'Neo4jError'

/**
* If the error is considered retriable.
* This does not apply when running auto-commit transactions using {@link Session#run}
*
* @type {boolean}
* @public
*/
this.retriable = _isRetriableCode(code)
}

Expand Down
26 changes: 26 additions & 0 deletions packages/neo4j-driver-deno/lib/core/error.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/neo4j-driver-lite/esdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"enable": false
},
"brand": {
"title": "Neo4j Bolt Lite Driver 5.x for JavaScript",
"title": "Neo4j Bolt Lite Driver 6.x for JavaScript",
"repository": "https://github.com/neo4j/neo4j-javascript-driver"
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/neo4j-driver/esdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"enable": true
},
"brand": {
"title": "Neo4j Bolt Driver 5.x for JavaScript",
"title": "Neo4j Bolt Driver 6.x for JavaScript",
"repository": "https://github.com/neo4j/neo4j-javascript-driver"
}
}
Expand Down