Skip to content

Commit 11b257a

Browse files
authored
Fix undocumented members on GQLErrors and Neo4jErrors (#1300)
1 parent 5b63344 commit 11b257a

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
@@ -140,6 +140,13 @@ class GQLError extends Error {
140140
* @public
141141
*/
142142
this.rawClassification = diagnosticRecord?._classification ?? undefined
143+
/**
144+
* Represents the name for the type of error, inherited from base JavaScript {@link Error}.
145+
* Will be 'GQLError' for {@link GQLError}s and 'Neo4jError' for {@link Neo4jError}s.
146+
*
147+
* @type {string}
148+
* @public
149+
*/
143150
this.name = 'GQLError'
144151
}
145152

@@ -163,6 +170,11 @@ class Neo4jError extends GQLError {
163170
* Optional error code. Will be populated when error originates in the database.
164171
*/
165172
code: string
173+
174+
/**
175+
* Whether the request that caused this error can be safely retried without duplicate commits on the server.
176+
* This does not apply when running auto-commit transactions using {@link Session#run}
177+
*/
166178
retriable: boolean
167179

168180
/**
@@ -187,7 +199,21 @@ class Neo4jError extends GQLError {
187199
*/
188200
this.code = code
189201

202+
/**
203+
* The name of the type of error.
204+
*
205+
* @type {string}
206+
* @public
207+
*/
190208
this.name = 'Neo4jError'
209+
210+
/**
211+
* If the error is considered retriable.
212+
* This does not apply when running auto-commit transactions using {@link Session#run}
213+
*
214+
* @type {boolean}
215+
* @public
216+
*/
191217
this.retriable = _isRetriableCode(code)
192218
}
193219

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)