Skip to content

Commit 53a1a38

Browse files
committed
add connection exception errors
1 parent 723874e commit 53a1a38

File tree

5 files changed

+231
-24
lines changed

5 files changed

+231
-24
lines changed

modules/ROOT/content-nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
* xref:index.adoc[]
22
* xref:errors/index.adoc[]
33
** xref:errors/all-errors.adoc[]
4+
** xref:errors/gql-errors.adoc[]
45
* xref:notifications/index.adoc[]
56
** xref:notifications/all-notifications.adoc[]
67
* xref:changelogs.adoc[]
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
:description: This section describes the GQLSTATUS errors that Neo4j can return, grouped by category, and an example of when they can occur.
2+
3+
[[neo4j-gqlstatus-errors]]
4+
= List of all GQLSTATUS server error codes
5+
6+
The following page provides an overview of all server errors in Neo4j, along with some scenarios and their possible solutions.
7+
8+
* <<_connection-exceptions, Connection exceptions>>
9+
* <<_database-exceptions, Database exceptions>>
10+
11+
12+
[[_connection-exceptions]]
13+
== Connection exceptions
14+
15+
The following table lists the connection exceptions that can occur in Neo4j.
16+
17+
=== 08000
18+
19+
Notifies the client that an exception occurred during the connection.
20+
21+
.Error details
22+
[cols="<1s,<4"]
23+
|===
24+
|GQLSTATUS code
25+
m|0800
26+
|Status description
27+
a|error: connection exception
28+
|Classification
29+
m|CLIENT_ERROR
30+
|SeverityLevel
31+
m|ERROR
32+
|===
33+
34+
=== 08007
35+
36+
Notifies the client that an exception occurred during the resolution of a transaction.
37+
38+
.Error details
39+
[cols="<1s,<4"]
40+
|===
41+
|GQLSTATUS code
42+
m|08007
43+
|Status description
44+
|error: connection exception - transaction resolution unknown.
45+
|Classification
46+
m|CLIENT_ERROR
47+
|SeverityLevel
48+
m|ERROR
49+
|===
50+
51+
=== 08N00
52+
53+
Notifies the client that an exception occurred while trying to connect to a specified database.
54+
55+
.Error details
56+
[cols="<1s,<4"]
57+
|===
58+
|GQLSTATUS code
59+
m|08N00
60+
|Status description
61+
a|error: connection exception - unable to connect to database. Unable to connect to database `$db`. Unable to get bolt address of the leader. Check the status of the database. Retrying your request at a later time may succeed.
62+
|Classification
63+
m|CLIENT_ERROR
64+
|SeverityLevel
65+
m|ERROR
66+
|===
67+
68+
=== 08N01
69+
70+
Notifies the client that an exception occurred while trying to write to a specified database.
71+
72+
.Error details
73+
[cols="<1s,<4"]
74+
|===
75+
|GQLSTATUS code
76+
m|08N01
77+
|Status description
78+
a|error: connection exception - unable to write to database. Unable to write to database `$db` on this server. Server-side routing is disabled. Either connect to the database leader directly or enable server-side routing by setting `$cfgSetting=true`.
79+
|Classification
80+
m|CLIENT_ERROR
81+
|SeverityLevel
82+
m|ERROR
83+
|===
84+
85+
=== 08N02
86+
87+
Notifies the client that an exception occurred while trying to connect to a specified database.
88+
89+
.Error details
90+
[cols="<1s,<4"]
91+
|===
92+
|GQLSTATUS code
93+
m|08N02
94+
|Status description
95+
a|error: connection exception - unable to route to database. Unable to connect to database `$db`. Server-side routing is disabled. Either connect to `$db` directly, or enable server-side routing by setting `$cfgSetting=true`.
96+
|Classification
97+
m|CLIENT_ERROR
98+
|SeverityLevel
99+
m|ERROR
100+
|===
101+
102+
=== 08N03
103+
104+
Notifies the client that an exception occurred while trying to connect to a specified database.
105+
106+
.Error details
107+
[cols="<1s,<4"]
108+
|===
109+
|GQLSTATUS code
110+
m|08N03
111+
|Status description
112+
a|error: connection exception - failed to write to graph. Failed to write to graph `$graph`. Check the defined access mode in both driver and database.
113+
|Classification
114+
m|CLIENT_ERROR
115+
|SeverityLevel
116+
m|ERROR
117+
|===
118+
119+

modules/ROOT/pages/errors/index.adoc

Lines changed: 86 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,91 @@
1-
:description: The Neo4j error codes for Neo4j version {neo4j-version}.
2-
3-
[[error-codes]]
1+
:description: The Neo4j error codes for Neo4j version.
2+
[[neo4j-errors]]
43
= Server errors
54

6-
Error codes are Neo4j status codes returned by the server when the execution of a query fails.
7-
They always have the severity level `ERROR`.
8-
Errors are grouped based on the type of the error code:
5+
[role=label--version-5.25]
6+
[[gqlstatus-error-object]]
7+
== GQL-status error object
8+
9+
[[gqlstatus-standard-defined-codes]]
10+
=== Standard-defined GQLSTATUS codes
911

10-
Client errors::
11-
These errors are caused by the client and are usually related to the request itself.
12-
Client errors have the prefix `Neo.ClientError`.
12+
.Standard-defined GQLSTATUS error codes
13+
[options="header", cols="<1s,<4"]
14+
|===
15+
|GQLSTATUS code | StatusDescription
16+
| 08000 | error: connection exception
17+
| 08007 | error: connection exception - transaction resolution unknown
18+
| 22000 | error: data exception
19+
| 22001 | error: data exception - string data, right truncation
20+
| 22003 | error: data exception - numeric value out of range. The numeric value `$value` is outside the required range.
21+
| 22004 | error: data exception - null value not allowed
22+
| 22007 | error: data exception - invalid date, time, or datetime format
23+
| 22008 | error: data exception - datetime field overflow
24+
| 22011 | error: data exception - substring error
25+
| 22012 | error: data exception - division by zero
26+
| 22015 | error: data exception - interval field overflow
27+
| 22018 | error: data exception - invalid character value for cast. The character value `$value` is an invalid argument for the specified cast.
28+
| 2201E | error: data exception - invalid argument for natural logarithm. The value `$value` is an invalid argument for the specified natural logarithm.
29+
| 2201F | error: data exception - invalid argument for power function. The value `$value` is an invalid argument for the specified power function.
30+
| 22027 | error: data exception - trim error
31+
| 2202F | error: data exception - array data, right truncation
32+
| 22G02 | error: data exception - negative limit value
33+
| 22G03 | error: data exception - invalid value type
34+
| 22G04 | error: data exception - values not comparable
35+
| 22G05 | error: data exception - invalid date, time, or datetime function field name
36+
| 22G06 | error: data exception - invalid datetime function value
37+
| 22G07 | error: data exception - invalid duration function field name
38+
| 22G0B | error: data exception - list data, right truncation
39+
| 22G0C | error: data exception - list element error
40+
| 22G0F | error: data exception - invalid number of paths or groups
41+
| 22G0H | error: data exception - invalid duration format. The duration format `$format` is invalid.
42+
| 22G0M | error: data exception - multiple assignments to a graph element property
43+
| 22G0N | error: data exception - number of node labels below supported minimum
44+
| 22G0P | error: data exception - number of node labels exceeds supported maximum
45+
| 22G0Q | error: data exception - number of edge labels below supported minimum
46+
| 22G0R | error: data exception - number of edge labels exceeds supported maximum
47+
| 22G0S | error: data exception - number of node properties exceeds supported maximum
48+
| 22G0T | error: data exception - number of edge properties exceeds supported maximum
49+
| 22G0U | error: data exception - record fields do not match
50+
| 22G0V | error: data exception - reference value, invalid base type
51+
| 22G0W | error: data exception - reference value, invalid constrained type
52+
| 22G0X | error: data exception - record data, field unassignable
53+
| 22G0Y | error: data exception - record data, field missing
54+
| 22G0Z | error: data exception - malformed path
55+
| 22G10 | error: data exception - path data, right truncation
56+
| 22G11 | error: data exception - reference value, referent deleted
57+
| 22G12 | error: data exception - invalid value type
58+
| 22G13 | error: data exception - invalid group variable value
59+
| 22G14 | error: data exception - incompatible temporal instant unit groups
60+
| 25000 | error: invalid transaction state
61+
| 25G01 | error: invalid transaction state - active GQL-transaction
62+
| 25G02 | error: invalid transaction state - catalog and data statement mixing not supported
63+
| 25G03 | error: invalid transaction state - read-only GQL-transaction
64+
| 25G04 | error: invalid transaction state - accessing multiple graphs not supported
65+
| 2D000 | error: invalid transaction termination
66+
| 40000 | error: transaction rollback
67+
| 40003 | error: transaction rollback - statement completion unknown
68+
| 42000 | error: syntax error or access rule violation
69+
| 42001 | error: syntax error or access rule violation - invalid syntax
70+
| 42002 | error: syntax error or access rule violation - invalid reference
71+
| 42004 | error: syntax error or access rule violation - use of visually confusable identifiers
72+
| 42006 | error: syntax error or access rule violation - number of edge labels below supported minimum
73+
| 42007 | error: syntax error or access rule violation - number of edge labels exceeds supported maximum
74+
| 42008 | error: syntax error or access rule violation - number of edge properties exceeds supported maximum
75+
| 42009 | error: syntax error or access rule violation - number of node labels below supported minimum
76+
| 42010 | error: syntax error or access rule violation - number of node labels exceeds supported maximum
77+
| 42011 | error: syntax error or access rule violation - number of node properties exceeds supported maximum
78+
| 42012 | error: syntax error or access rule violation - number of node type key labels below supported minimum
79+
| 42013 | error: syntax error or access rule violation - number of node type key labels exceeds supported maximum
80+
| 42014 | error: syntax error or access rule violation - number of edge type key labels below supported minimum
81+
| 42015 | error: syntax error or access rule violation - number of edge type key labels exceeds supported maximum
82+
| G1000 | error: dependent object error
83+
| G1001 | error: dependent object error - edges still exist
84+
| G1002 | error: dependent object error - endpoint node is deleted
85+
| G1003 | error: dependent object error - endpoint node not in current working graph
86+
| G2000 | error: graph type violation
87+
|===
1388

14-
Transient errors::
15-
These errors are detected by the server and are usually related to some kind of database unavailability, such as limits reached, out-of-memory, timeouts, etc.
16-
The error can be temporary and could therefore succeed if retrying the request.
17-
Transient errors have the prefix `Neo.TransientError`.
89+
[[gqlstatus-neo4j-defined-codes]]
90+
=== Neo4j-defined GQLSTATUS error codes
1891

19-
Database errors::
20-
These errors are caused by the database and are usually related to the database state.
21-
Database errors have the prefix `Neo.DatabaseError`.

modules/ROOT/pages/index.adoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ endif::[]
1212

1313
This document details all status codes that a Neo4j DBMS may return to indicate the outcome of a request.
1414

15+
== GQL status codes
1516

16-
== Format
17+
18+
== Neo4j status codes
19+
20+
=== Format
1721

1822
Each Neo4j status code follows the same format:
1923

@@ -23,7 +27,7 @@ Neo.[Type].[SubType].[Name]
2327
-----
2428

2529

26-
== Types of Neo4j status codes
30+
=== Types of Neo4j status codes
2731

2832
The fact that a Neo4j status code is returned by the server does not always mean there is a fatal error.
2933
Neo4j status codes can also indicate transient problems that may go away if you retry the request.

modules/ROOT/pages/notifications/index.adoc

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,25 @@ Additional helper methods are exposed for some useful fields.
9393
!===
9494
|===
9595

96+
=== Standard-defined GQLSTATUS notification codes
97+
98+
The GQL standard defines a set of GQLSTATUS codes that are used to represent successful completion, warnings, and informational messages.
99+
The following table lists the standard-defined GQLSTATUS codes and their meanings:
100+
101+
.Standard-defined GQLSTATUS notification codes
102+
[options="header", cols="<1s,<4"]
103+
|===
104+
|GQLSTATUS code | StatusDescription
105+
| 00000 | note: successful completion
106+
| 00001 | note: successful completion - omitted result
107+
| 01000 | warn: warning
108+
| 01004 | warn: string data, right truncation
109+
| 01G03 | warn: graph does not exist
110+
| 01G04 | warn: graph type does not exist
111+
| 01G11 | warn: null value eliminated in set function
112+
| 02000 | note: no data
113+
| 03000 | info: informational
114+
|===
96115

97116
[[general-codes-for-success]]
98117
=== General codes for success
@@ -306,9 +325,3 @@ Finally, the list of poly-filled GQL-status objects is sorted according to the G
306325
// The following table illustrates the compatibility between the different server and driver versions for both the current Notification API and the GqlStatusObject API:
307326

308327
// TODO
309-
310-
311-
312-
313-
314-
>>>>>>> gql-notifications

0 commit comments

Comments
 (0)