Skip to content

Commit edb0d38

Browse files
committed
Further updates based on feedback
1 parent e666f2e commit edb0d38

File tree

5 files changed

+50
-65
lines changed

5 files changed

+50
-65
lines changed

modules/ROOT/pages/changelogs.adoc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
:description: This page lists all changes to status codes per Neo4j version.
22
= Changes to status codes per Neo4j version
33

4-
== Neo4j 5.26
5-
6-
**Changed:**
7-
Using differently ordered return items in a `UNION [ALL]` clause has been undeprecated following cost-benefit analysis and valuable user feedback.
8-
94
== Neo4j 5.25
105

11-
**New:**
12-
136
Starting from 5.25, the query log includes the GQL error information under the JSON object `errorInfo`.
147
For more information, see link:https://neo4j.com/docs/operations-manual/current/monitoring/logging/#gql-error-information[Operations Manual -> GQL error information].
158

modules/ROOT/pages/errors/all-errors.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33

44
[[neo4j-errors]]
5-
= List of Neo4j codes
5+
= List of Neo4j error codes
66

77
This page lists the current Neo4j error codes, which will be replaced by xref:errors/gql-errors.adoc[GQLSTATUS error codes] in the future.
88

99
Error codes are returned by the server when the execution of a query fails.
1010
They always have the severity level `ERROR`.
11-
Errors are grouped based on the type of the Neo4j status code:
11+
Errors are grouped based on the type of the Neo4j code:
1212

1313
Client errors::
1414
These errors are caused by the client (user input or user application) and are usually related to the request itself.
@@ -17,11 +17,11 @@ The Neo4j codes for client errors have the prefix `Neo.ClientError`.
1717
Transient errors::
1818
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.
1919
The error can be temporary, and the request could succeed if retried.
20-
The Neo4j status codes for transient errors have the prefix Neo.`TransientError`.
20+
The Neo4j codes for transient errors have the prefix Neo.`TransientError`.
2121

2222
Database errors::
2323
These errors are caused by the database and are usually related to the database state.
24-
The Neo4j status codes for database errors have the prefix `Neo.DatabaseError`.
24+
The Neo4j codes for database errors have the prefix `Neo.DatabaseError`.
2525

2626
This page contains lists of all Neo4j errors, grouped by type.
2727

modules/ROOT/pages/errors/index.adoc

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,37 @@
33
= Server errors
44

55
The Neo4j DBMS returns a server error to indicate that the outcome of a Cypher query or command execution is unsuccessful.
6+
The driver receives these erors and sends them to the Neo4j tools (e.g. Browser, Bloom, Cypher Shell) or the user application, which display them to the user.
67

7-
Starting from version 5.25, the Neo4j error codes have an additional GQL-status object along with the Neo4j exception that provides information about the status of a Cypher query or command execution in compliance with the link:https://www.iso.org/standard/76120.html[ISO/IEC 39075:2024(en) - Information technology - Database languages - GQL Standard].
8+
Starting from version 5.26, the Neo4j error codes have an additional GQL-status object along with the Neo4j exception that provides information about the status of a Cypher query or command execution in compliance with the link:https://www.iso.org/standard/76120.html[ISO/IEC 39075:2024(en) - Information technology - Database languages - GQL Standard].
9+
This additional GQL-status object is also displayed in the query log from Neo4j 5.25.
10+
For more information, see link:https://neo4j.com/docs/operations-manual/current/monitoring/logging/#gql-error-information[Operations Manual -> GQL error information].
811

912
[NOTE]
1013
====
11-
This additional GQL-status object is currently displayed only in the query log.
12-
For more information, see link:https://neo4j.com/docs/operations-manual/current/monitoring/logging/#gql-error-information[Operations Manual -> GQL error information].
14+
The default GQLSTATUS code 50N42 is returned when an exception does not have a GQL-status object.
15+
Starting from Neo4j 5.25, we started adding GQL objects to exceptions.
16+
Therefore, you can expect many 50N42 codes during this transition period.
17+
However, it is important not to rely on this default code, as future Neo4j versions might change it by adding an appropriate GQL object to the exception.
18+
Additionally, GQL codes for external procedures are not yet stable.
1319
====
1420

15-
This page describes the GQL-status object and the Neo4j error frameworks, their structure, the objects they provide for errors, and how to interpret them.
16-
It also explains the error internals and the server-driver compatibility for both the GQLSTATUS and errors.
21+
This page describes the GQL-status and the Neo4j-status object frameworks for errors, their structure, the objects they provide for errors, and how to interpret them.
22+
It also explains the error internals and the server-driver compatibility for both the GQLSTATUS and errors.
1723

1824
[role=label--version-5.25]
1925
[[gqlstatus-error-object]]
2026
== GQL-status error object
2127

22-
In the GQL-status object framework, errors are an implementation-defined subset of the GQL-status objects that cover exceptions.
23-
24-
In GQL, the execution of a query from user to server always has an outcome, called the _execution outcome_.
25-
The execution outcome is a list of GQL-status objects ordered by the following precedence rules:
28+
In the GQL-status object framework, when a user executes a query to the server, it always produces a result known as the _execution outcome_.
29+
If an error occurs during execution, the outcome is recorded as an exception condition, indicating a failed outcome with no result.
30+
The execution outcome for errors is represented as a list of GQL-status objects with a failed outcome, which are organized according to the following precedence rules:
2631

2732
. Every exception that results in a transaction rollback takes precedence over other exceptions.
2833
. Every exception takes precedence over any completion condition.
34+
For completion conditions, see the xref:notifications/index.adoc#gqlstatus-notification-object[GQL-status notification object].
2935

30-
The GQL-status object also includes the Neo4j-specific information, such as the severity level and the error classification.
36+
The GQL-status object also includes Neo4j-specific information, such as severity level and error classification.
3137

3238
Each GQL-status object consists of the following fields:
3339

@@ -39,10 +45,11 @@ a| A 5-character string that is the concatenation of a 2-character class code fo
3945
|StatusDescription
4046
a| A human-readable description of the GQLSTATUS, which consists of a condition, a subcondition, and an optional additional text about the condition.
4147
The condition and subcondition are textual representations of the class and subclass codes, respectively.
48+
The format is `error: condition - subcondition. AdditionalInfo`.
4249
The subcondition for the subclass 000 is empty.
4350
| DiagnosticRecord
4451
a| Extra information about the status, given as key-value pairs, both on the server and driver side.
45-
To retrieve the full diagnostic record, you can use the `diagnosticRecord()` method on both the server and driver sides.
52+
To retrieve the full diagnostic record, you can use the `diagnosticRecord()` on the server side or the corresponding method on the driver sides.
4653
Additional helper methods are exposed for some useful fields.
4754
[cols="<1s,<4"]
4855
!===
@@ -57,16 +64,15 @@ Additional helper methods are exposed for some useful fields.
5764
!===
5865
|===
5966

60-
A GQL-status error object can also contain an optional wrapped GQL-status object.
61-
This wrapped object is referred to as a `cause` and used to provide additional, more specific diagnostic information.
67+
A GQL-status error object can also contain an optional GQL-status object that represents the cause of the error and is used to provide additional, more specific diagnostic information.
6268

6369
[[gqlstatus-neo4j-defined-codes]]
6470
== Classes of GQLSTATUS error codes
6571

6672
The GQLSTATUS codes are divided into classes and subclasses.
6773
The class code is a 2-character string that indicates the general condition of the status, such as connection exception, data exception, etc.
6874
The subclass code is a 3-character string that provides more detailed information about the condition.
69-
The Neo4j-define subclasses start with N, followed by a 2-digit number, while the ones that do not start with N are standard-defined subclasses.
75+
//Currently, the Neo4j-defined subclasses start with N or I, followed by a 2-digit number, while the standard-defined subclasses start with 0-4 or A, B, C, D, E, F, G, or H and a 2-digit number.
7076

7177
The following table lists the GQLSTATUS classes and their meanings:
7278

@@ -94,10 +100,10 @@ The following table lists the GQLSTATUS classes and their meanings:
94100
| procedure exception
95101
|===
96102

97-
[[-error-object]]
98-
== Neo4j error object
103+
[[neo4j-error-object]]
104+
== Neo4j-status error object
99105

100-
The Neo4j error object contains diagnostic information representing the *unsuccessful* outcome of a Cypher query or command execution, including severity, status code, category, description, message, and position in the query text where the error is relevant.
106+
The Neo4j-status object for errors contains diagnostic information representing the *unsuccessful* outcome of a Cypher query or command execution, including severity, status code, category, description, message, and position in the query text where the error is relevant.
101107
Depending on the application, some of the fields from the error object might not be visible.
102108

103109
The error object consists of the following fields:
@@ -164,8 +170,8 @@ Most of these implement the `HasStatus` interface, which means they have a statu
164170

165171
On the server side, an exception contains normal Java constructors and methods like `getMessage()`, `getCause()`, etc., and additionally the `status()` method from the `HasStatus` API, which returns the status code.
166172

167-
Starting from 5.25, the exceptions also get new compulsary fields for `gqlStatus`, `statusDescription`, `diagnosticRecord`, and an optional field for `cause`.
168-
The cause field is a wrapped underlying Neo4j exception, which in turn has its own GQLSTATUS, statusdescription, diagnostic record, and message. +
173+
The exceptions also get new compulsary fields for `gqlStatus`, `statusDescription`, `diagnosticRecord`, and an optional field for `cause`.
174+
The cause field in turn has its own GQLSTATUS, statusdescription, diagnostic record, and message. +
169175
The `getMessage()` method is kept as Java exceptions inherently have this method.
170176
And a new classification field is added to cover the division of client errors, transient errors, and database errors, which today is part of the Neo4j code.
171177
All of these fields construct the GQLSTATUS object, which is sent to the driver as part of the Failure Bolt message.
@@ -186,18 +192,9 @@ As the clients can have separate driver versions, they may have different error
186192

187193
In Neo4j 5.25, the default JSON template for the query log is updated to include `errorInfo` entry.
188194
This entry contains `GQLSTATUS`, `statusDescription`, `classification`, `position` (if applicable), and `cause` (if applicable) with the same entries.
189-
The `failureReason` entry is deprecated from 5.26.
190-
191-
[NOTE]
192-
====
193-
The default GQLSTATUS code 50N42 is returned when an exception does not have a GQL-status object.
194-
Starting from Neo4j 5.25, we started adding GQL objects to exceptions.
195-
Therefore, you can expect many 50N42 codes during this transition period.
196-
However, it is important not to rely on this default code, as future Neo4j versions might change it by adding an appropriate GQL object to the exception.
197-
Additionally, GQL codes for external procedures are not yet stable.
198-
====
195+
//The `failureReason` entry is deprecated from ...
199196

200-
// Starting from Neo4j 2025.01, a new JSON template is available for the query log, which is the default set in server_log.xml.
197+
// Starting from Neo4j 2025.01, a new JSON template is available for the query log, which is the default set in _server_log.xml_.
201198
// It contains the `errorInfo` entry, but not the `failureReason` entry, which is switched off by default.
202199

203200

modules/ROOT/pages/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ endif::[]
99
:description: Status codes for errors and notifications Neo4j 5
1010
:neo4j-buildnumber: {neo4j-version}
1111

12-
This manual provides status codes for errors and notifications that a Neo4j server may return to indicate the result of a Cypher request.
12+
This manual covers all status codes for errors and notifications that a Neo4j server may return to indicate the result of a Cypher request.
1313

1414
Starting from 5.23 for notifications and 5.25 for errors, the Neo4j DBMS supports the GQL standard. +
1515
GQL is the new link:https://www.iso.org/home.html[ISO] International Standard query language for graph databases.

modules/ROOT/pages/notifications/index.adoc

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,38 @@
33
[[notifications]]
44
= Server notifications
55

6-
After a successful query execution, the Neo4j server sends notifications to provide advice on how to improve the query's quality or give additional information about the query execution.
6+
After a successful query execution, the Neo4j server sends notifications to give additional information about the query execution or provide advice on how to improve the query's quality.
77
The driver receives these notifications and sends them to the Neo4j tools (e.g. Browser, Bloom, Cypher Shell) or the user application, which display them to the user.
88

99
From version 5.23, Neo4j has a new GqlStatusObject API in addition to the existing Notification API (deprecated since 5.26).
1010
The GqlStatusObject API provides information about the status of a Cypher query or command execution in compliance with the link:https://www.iso.org/standard/76120.html[ISO/IEC 39075:2024(en) - Information technology - Database languages - GQL Standard].
1111

12-
This page describes the GQL-status object and the Neo4j notification frameworks, their structure, the objects they provide for notifications, and how to interpret them.
12+
This page describes the GQL-status object and the Neo4j notification frameworks, their structure, the objects they provide for notification, and how to interpret them.
1313
It also explains the server notification grouping and filtering, the notification internals, and the server-driver compatibility for both the Notification and GqlStatusObject APIs.
1414

1515
[role=label--version-5.23]
1616
[[gqlstatus-notification-object]]
1717
== GQL-status notification object
1818

19-
In the GQL-status object framework, notifications are an implementation-defined subset of the GQL-status objects that cover informational notes and warnings, but not errors, `SUCCESS`, `NO DATA`, or `OMITTED RESULT`.
20-
For the latter, see <<general-codes-for-success, General codes for success>>. +
21-
22-
In GQL, the execution of a query from user to server always has an outcome, called the _execution outcome_.
23-
The execution outcome is a list of GQL-status objects, ordered by the following precedence, where the first object in the list is the primary GQL-status object:
19+
In the GQL-status object framework, when a user executes a query to the server, it always produces a result known as the _execution outcome_.
20+
If no error occurs during execution, the outcome is recorded as a completion condition, indicating a successful result with a regular non-empty result, an omitted result, or no data.
21+
It is represented as a list of GQL-status objects, which are organized according to the following precedence rules, where the first object in the list is the primary GQL-status object:
2422

2523
. `NO DATA` has precedence over `WARNING`.
2624
. `WARNING` has precedence over the `SUCCESSFUL COMPLETION` subclass.
2725
. `SUCCESSFUL COMPLETION` subclass has precedence over `INFORMATIONAL`.
2826
. `INFORMATIONAL` is the condition with the least precedence.
2927

28+
For more information about `SUCCESSFUL COMPLETION`, `NO DATA`, or `OMITTED RESULT`, see <<general-codes-for-success, General codes for success>>. +
29+
The GQL-status object can contain multiple GQL-status objects, where each object represents a different condition of the query execution.
3030
The primary GQL-status object describes the condition with the greatest precedence and is always present.
3131
All other GQL-status objects in the list are additional GQL-status objects.
3232

33-
The GQL-status object also includes the Neo4j-specific information, such as the severity level and the classification of the notification, which can be used for filtering.
33+
The GQL-status object also includes Neo4j-specific information, such as severity level and notification classification, which can be used for filtering.
3434
For more information about notification grouping and filtering, see <<notification-grouping-and-filtering>>.
3535

3636
Each GQL-status object consists of the following fields:
37-
— A GQLSTATUS, which is a character string identifying a condition as defined in Subclause 23.1,
38-
“GQLSTATUS”.
39-
— A status description, which is a character string describing the GQLSTATUS.
40-
— A record with diagnostic information as defined in Subclause 23.2, “Diagnostic records”.
41-
— An optional nested GQL-status object for providing additional diagnostic information, such as a
42-
cause.
37+
4338
.GQLSTATUS notification object
4439
[cols="<1s,<4"]
4540
|===
@@ -50,7 +45,7 @@ a| A human-readable description of the GQLSTATUS, which consists of a condition,
5045
The condition and subcondition are textual representations of the class and subclass codes, respectively.
5146
| DiagnosticRecord
5247
a| Extra information about the status, given as key-value pairs, both on the server and driver side.
53-
To retrieve the full diagnostic record, you can use the `diagnosticRecord()` method on both the server and driver sides.
48+
To retrieve the full diagnostic record, you can use the `diagnosticRecord()` on the server side or the corresponding method on the driver sides.
5449
Additional helper methods are exposed for some useful fields.
5550
[cols="<1s,<4"]
5651
!===
@@ -154,21 +149,21 @@ The following table lists the Neo4j-defined groups of GQLSTATUS codes and their
154149
|===
155150

156151
[role=label--deprecated-5.26]
157-
[[-notification-object]]
158-
== notification object
152+
[[neo4j-notification-object]]
153+
== Neo4j-status notification object
159154

160-
The Neo4j notification object contains diagnostic information representing the successful outcome of a Cypher query or command execution, including severity, the `ClientNotification` code, category, title, description, and position in the query text where the notification is relevant.
155+
The Neo4j-status object for notifications contains diagnostic information representing the successful outcome of a Cypher query or command execution, including severity, the `ClientNotification` code, category, title, description, and position in the query text where the notification is relevant.
161156
Depending on the application, some of the fields from the notification object might not be visible.
162157

163-
The notification object consists of the following fields:
158+
The notification object consists of the following fields:
164159

165-
.Neo4j notification object
160+
.Neo4j notification object
166161
[cols="<1s,<4"]
167162
|===
168-
|Neo4j code
169-
a|The Neo4j status code in the form of `Neo.ClientNotification.[SubType].[Name]`.
163+
|Neo4j code
164+
a|The Neo4j code in the form of `Neo.ClientNotification.[SubType].[Name]`.
170165
|Title
171-
a|The title of the Neo4j status code.
166+
a|The title of the Neo4j code.
172167
|Description
173168
a|The description of the specific notification.
174169
|Severity level

0 commit comments

Comments
 (0)