Skip to content

Commit 10bebd6

Browse files
committed
Swamp the lagacy and the GQL code tab examples
1 parent b106341 commit 10bebd6

File tree

8 files changed

+998
-923
lines changed

8 files changed

+998
-923
lines changed

modules/ROOT/content-nav.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
* xref:index.adoc[]
22
* xref:errors/index.adoc[]
3-
** xref:errors/all-errors.adoc[]
43
** xref:errors/gql-errors.adoc[]
4+
** xref:errors/all-errors.adoc[]
55
* xref:notifications/index.adoc[]
66
** xref:notifications/all-notifications.adoc[]
77
* xref:changelogs.adoc[]

modules/ROOT/pages/draft.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
In GQL, when the execution of a GQL-request fails, the execution outcome (in this case failed outcome) has no results but only a primary GQL-status object describing the exception condition (i.e., the error) that caused the failure and possibly a list of other additional GQL-status objects describing other conditions related to the same GQL-request.
2+
3+
A GQL-status object comprises:
4+
A mandatory GQLSTATUS code, which is a 5 character string identifying a condition (the first 2 characters identify the GQLSTATUS class code and the 3 other characters identify the GQLSTATUS subclass code)
5+
A mandatory status description, which is a user-facing message describing the GQLSTATUS
6+
An optional record with diagnostic information (such as the code of the operation executed, the current working directory, etc.)
7+
An optional nested GQL-status object for providing additional diagnostic information, such as a cause.
8+
In GQL, it is up to implementations to make several conditions available when a GQL-request is executed. However, if multiple conditions are made available they should be returned in separate GQL-status objects. In this case, there should be a primary GQL-status object and a list of additional GQL-status objects. GQL prescribes the below precedence rules to determine the primary GQL-status object:
9+
Every exception condition for transaction rollback has precedence over every other exception condition.
10+
Every exception condition has precedence over every completion condition.
11+
Note that GQL exception conditions are equivalent to Neo4j errors, and GQL completion conditions include Cypher notifications whose severity level is either warning or information (except those related to performance or variable shadowing, which are equivalent to GQL additional informational messages that can theoretically accompany both completion and exception condition). GQL completion conditions go beyond Cypher notifications. They include no data and successful completion.
12+
13+
14+
15+
in Cypher, if the execution of a request fails, a single GQL-status object describing a specific error is returned, i.e., the primary GQL-status object, which is also GQL-compliant. This is different from the success case, where multiple Cypher notifications can be returned, hence multiple GQL-status objects describing completion conditions and informational conditions.
16+
17+
Currently, a Neo4j error code can span several Neo4j exceptions and each exception can have several error messages. Each exception can be also linked to several Neo4j error codes. Some codes have no linked exceptions at all (See examples depicted in the table below). Hence, there is a many-to-many relationship between current error codes and exceptions. This is why many of the clients rely on the error message to identify a specific error.
18+
19+
The ultimate goal is to have a 1-1 mapping between a GQLSTATUS code and a specific error message so as to let the client rely on one unique and standardized code. The next section describes how to assign a single and unique GQLSTATUS code for each error to achieve this goal.
20+
21+
If a Neo4j error matches a standard-defined condition and subcondition, then the standard-defined GQLSTATUS code should be used for that error. For instance, (Neo.ClientError.Statement.ArithmeticError, ArithmeticException, “/by zero”) matches the “data exception” condition and “division by zero” subcondition in GQL (i.e., 22012 GQLSTATUS code).
22+
23+
error: data exception - string data, right truncation

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

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
1-
:description: The Neo4j error codes for Neo4j version {neo4j-version}.
1+
:description: The legacy error codes for Neo4j 5.
22

33

44
[[neo4j-errors]]
5-
= List of all server error codes
5+
= List of legacy server error codes
6+
7+
Error codes are Neo4j status codes returned by the server when the execution of a query fails.
8+
They always have the severity level `ERROR`.
9+
Errors are grouped based on the type of the error code:
10+
11+
Client errors::
12+
These errors are caused by the client and are usually related to the request itself.
13+
Client errors have the prefix `Neo.ClientError`.
14+
15+
Transient errors::
16+
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.
17+
The error can be temporary and could therefore succeed if retrying the request.
18+
Transient errors have the prefix Neo.`TransientError`.
19+
20+
Database errors::
21+
These errors are caused by the database and are usually related to the database state.
22+
Database errors have the prefix `Neo.DatabaseError`.
623

724
This page contains lists of all Neo4j errors, grouped by type.
825

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
:description: This section describes the GQLSTATUS errors that Neo4j can return, grouped by category, and an example of when they can occur.
22

33
[[neo4j-gqlstatus-errors]]
4-
= List of all GQLSTATUS server error codes
4+
= List of GQLSTATUS server error codes
55

66
//The following page provides an overview of all server errors in Neo4j, along with some scenarios and their possible solutions.
77
The following page provides an overview of all GQLSTATUS server error codes in Neo4j.
@@ -225,7 +225,7 @@ Status description:: error: data exception - invalid entity type. Invalid input
225225

226226
// === 22N28
227227

228-
// Status description:: error: data exception - overflow error. The result of the operation `{ $operation }` has caused an overflow.
228+
// Status description:: error: data exception - overflow error. The result of the operation `{ $operation }` has caused an overflow.
229229

230230
// === 22N29
231231

@@ -277,7 +277,7 @@ Status description:: error: data exception - invalid shortest path expression. S
277277

278278
=== 22N41
279279

280-
Status description:: error: data exception - merge node uniqueness constraint violation. The 'MERGE' clause did not find a matching node `{ $variable }` and cannot create a new node due to conflicts with existing uniqueness constraints.
280+
Status description:: error: data exception - merge node uniqueness constraint violation. The 'MERGE' clause did not find a matching node `{ $variable }` and cannot create a new node due to conflicts with existing uniqueness constraints.
281281

282282
=== 22N42
283283

@@ -305,7 +305,7 @@ Status description:: error: data exception - invalid parallel runtime configurat
305305

306306
=== 22N49
307307

308-
Status description:: error: data exception - CSV buffer size overflow. Cannot read a CSV field larger than the set buffer size. Ensure the field does not have an unterminated quote, or increase the buffer size via 'dbms.import.csv.buffer_size'.
308+
Status description:: error: data exception - CSV buffer size overflow. Cannot read a CSV field larger than the set buffer size. Ensure the field does not have an unterminated quote, or increase the buffer size via 'dbms.import.csv.buffer_size'.
309309

310310
=== 22N51
311311

@@ -469,7 +469,7 @@ Status description:: error: data exception - cannot convert alias local to remot
469469

470470
// === 22N94
471471

472-
// Status description:: error: data exception - invalid YIELD *. 'YIELD *' is not supported in this context. Explicitly specify which columns to yield.
472+
// Status description:: error: data exception - invalid YIELD *. 'YIELD *' is not supported in this context. Explicitly specify which columns to yield.
473473

474474
=== 22N95
475475

@@ -497,7 +497,7 @@ Status description:: error: data exception - invalid property based access contr
497497

498498
// === 22NA1
499499

500-
// Status description:: error: data exception - invalid property based access control rule involving non-commutative expressions. The property `{ $propKey }` must appear on the left hand side of the `{ $operation }` operator.
500+
// Status description:: error: data exception - invalid property based access control rule involving non-commutative expressions. The property `{ $propKey }` must appear on the left hand side of the `{ $operation }` operator.
501501

502502
// === 22NA2
503503

0 commit comments

Comments
 (0)