You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
replace the script with a new one that generates the index file from a template and populates the codes, update the verification, add bash to automate the workflow, and add a readme
// This is an automatically generated file. Do not edit it directly.
2
+
// It is generated from the templates/gql-index-template.adoc file and should be edited there. //// //// //// //// //// ////
3
+
4
+
:description: This section describes the GQLSTATUS errors that Neo4j can return, grouped by category, and an example of when they can occur.
5
+
6
+
[[neo4j-gqlstatus-errors]]
7
+
= List of GQLSTATUS error codes
8
+
9
+
The following page provides an overview of all GQLSTATUS server error codes in Neo4j.
10
+
All errors in Neo4j have severity level `ERROR`.
11
+
12
+
[WARNING]
13
+
====
14
+
Please note that while GQLSTATUS codes remain stable (any changes to them will be breaking), changes to status descriptions associated with these codes are not breaking and may happen at any time.
15
+
For this reason, parsing the status descriptions or incorporating them into scripts is not recommended.
16
+
====
17
+
18
+
[[connection-exceptions]]
19
+
== Connection exceptions
20
+
21
+
Connection exceptions occur when the client (e.g. Browser/Bloom/Cypher Shell) is unable to connect to the server for various reasons such as network issues, server-side routing being disabled, or the database being unavailable, etc.
22
+
23
+
{codes_starting_with:'08'}
24
+
25
+
[[data-exceptions]]
26
+
== Data exceptions
27
+
28
+
Database exceptions occur when a client request contains the wrong format, types, or other unsupported input.
29
+
Some examples are data and constraint creation, which conflicts with existing constraints, properties of non-storable type, and spatial and temporal values with invalid components.
30
+
31
+
{codes_starting_with:'22'}
32
+
33
+
[[invalid-transaction-state]]
34
+
== Invalid transaction state
35
+
36
+
Invalid transaction state errors occur when the transaction is in an invalid state, such as when the transaction is terminated or closed, or when there is a conflict between the transaction state and applied updates.
37
+
38
+
{codes-starting with: '25'}
39
+
40
+
[[invalid-transaction-termination]]
41
+
== Invalid transaction termination
42
+
43
+
Invalid transaction termination errors occur when the transaction termination fails, such as when the transaction or constituent transaction fails to commit, or when the transaction termination fails to apply or append the transaction.
44
+
45
+
{codes-starting with: '2D'}
46
+
47
+
[[transaction-rollback]]
48
+
== Transaction rollback
49
+
50
+
Transaction rollback errors occur when there is a failure in a transaction or a constituent transaction rollback.
51
+
52
+
{codes-starting with: '40'}
53
+
54
+
[[syntax-error-or-access-rule-violation]]
55
+
== Syntax error or access rule violation
56
+
57
+
Syntax error or access rule violation errors occur when a Cypher query contains invalid syntax or when a client request violates the access rules, such as when a query tries to access a database without enough privileges, etc.
58
+
59
+
{codes-starting with: '42'}
60
+
61
+
[[general-processing-exceptions]]
62
+
== General processing exceptions
63
+
64
+
General processing exceptions occur when there is a general processing error, such as an internal error, deadlock, execution failure, invalid server state transition, constraint creation or drop failure, etc.
65
+
66
+
{codes-starting with: '50'}
67
+
68
+
[[system-configuration-or-operation-exceptions]]
69
+
== System configuration or operation exceptions
70
+
71
+
System configuration or operation exception errors occur when there is an error in the system configuration or operation, such as procedure registration failure, a missing class field annotation, an unsupported injectable component type, duplicate field names, invalid map key type, etc.
72
+
73
+
{codes-starting with: '51'}
74
+
75
+
[[procedure-exceptions]]
76
+
== Procedure exceptions
77
+
78
+
Procedure exceptions occur when there is an error in executing a procedure, such as when the procedure execution fails due to a client error, when the procedure cannot be invoked on a primary, when the number of arguments to checkConnectivity is invalid, etc.
= Scripts for generating and validating gql error index.adoc file
2
+
3
+
This folder contains utility scripts for generating and validating gql error index.adoc file.
4
+
5
+
== Scripts overview
6
+
7
+
The folder contains the following scripts:
8
+
9
+
10
+
=== `generate-gql-error-index-from-template.py`
11
+
12
+
This script generates the _auto-index.adoc_ file by using the template in _templates/gql-index-template.adoc_ and populating it with error codes from the individual files located in the _gql-errors_ directory.
13
+
14
+
What it does::
15
+
* Extracts error codes from filenames (e.g., 42007.adoc → 42007).
16
+
Extracts the status descriptions from individual error files.
17
+
* Extracts page roles from files (`:page-role: changed-2025.04`).
18
+
* Creates a new _auto-index.adoc_ file based on the template and populates it with the extracted data.
19
+
20
+
=== `validate_error_index.py`
21
+
22
+
This index validates the consistency between _index.adoc_ and individual error files, identifying discrepancies in Error codes, status descriptions, and page roles.
23
+
24
+
What it does::
25
+
* Checks for error codes mentioned in the index.adoc file that don't have corresponding files.
26
+
* Finds error files without index entries.
27
+
* Detects status description mismatches between the index and individual files.
28
+
* Verifies page role consistency.
29
+
30
+
=== `update-gql-error-index.sh`
31
+
32
+
This script runs the previous two scripts (the generation and validation scripts), and if validation passes, it replaces _index.adoc_ with _auto-index.adoc_.
33
+
34
+
What it does::
35
+
* Runs the `generate-gql-error-index-from-template.py` script to generate the _auto-index.adoc_ file.
36
+
* Runs the `validate_error_index.py` script to validate the generated file against the individual error files.
37
+
* If validation passes, it replaces the existing _index.adoc_ file with _auto-index.adoc_.
38
+
* If validation fails, it prints an error message and does not replace the _index.adoc_ file, while also keeping the _auto-index.adoc_ file for review.
0 commit comments