Skip to content

Commit 69ec03a

Browse files
authored
Fix undocumented members on GQLErrors and Neo4jErrors (#1306)
1 parent 72e67ff commit 69ec03a

File tree

5 files changed

+55
-3
lines changed

5 files changed

+55
-3
lines changed

packages/core/esdoc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"enable": true
3737
},
3838
"brand": {
39-
"title": "Neo4j Bolt Driver 4.1 for JavaScript",
39+
"title": "Neo4j Bolt Driver 6.x for JavaScript",
4040
"repository": "https://github.com/neo4j/neo4j-javascript-driver"
4141
}
4242
}

packages/core/src/error.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ class GQLError extends Error {
147147
* @public
148148
*/
149149
this.rawClassification = diagnosticRecord?._classification ?? undefined
150+
/**
151+
* Represents the name for the type of error, inherited from base JavaScript {@link Error}.
152+
* Will be 'GQLError' for {@link GQLError}s and 'Neo4jError' for {@link Neo4jError}s.
153+
*
154+
* @type {string}
155+
* @public
156+
*/
150157
this.name = 'GQLError'
151158
}
152159

@@ -171,6 +178,11 @@ class Neo4jError extends GQLError {
171178
* Optional error code. Will be populated when error originates in the database.
172179
*/
173180
code: string
181+
182+
/**
183+
* Whether the request that caused this error can be safely retried without duplicate commits on the server.
184+
* This does not apply when running auto-commit transactions using {@link Session#run}
185+
*/
174186
retriable: boolean
175187

176188
/**
@@ -195,7 +207,21 @@ class Neo4jError extends GQLError {
195207
*/
196208
this.code = code
197209

210+
/**
211+
* The name of the type of error.
212+
*
213+
* @type {string}
214+
* @public
215+
*/
198216
this.name = 'Neo4jError'
217+
218+
/**
219+
* If the error is considered retriable.
220+
* This does not apply when running auto-commit transactions using {@link Session#run}
221+
*
222+
* @type {boolean}
223+
* @public
224+
*/
199225
this.retriable = _isRetriableCode(code)
200226
}
201227

packages/neo4j-driver-deno/lib/core/error.ts

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/neo4j-driver-lite/esdoc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"enable": false
3737
},
3838
"brand": {
39-
"title": "Neo4j Bolt Lite Driver 5.x for JavaScript",
39+
"title": "Neo4j Bolt Lite Driver 6.x for JavaScript",
4040
"repository": "https://github.com/neo4j/neo4j-javascript-driver"
4141
}
4242
}

packages/neo4j-driver/esdoc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"enable": true
3737
},
3838
"brand": {
39-
"title": "Neo4j Bolt Driver 5.x for JavaScript",
39+
"title": "Neo4j Bolt Driver 6.x for JavaScript",
4040
"repository": "https://github.com/neo4j/neo4j-javascript-driver"
4141
}
4242
}

0 commit comments

Comments
 (0)