diff --git a/modules/ROOT/content-nav.adoc b/modules/ROOT/content-nav.adoc index 37f18944..0f0c9656 100644 --- a/modules/ROOT/content-nav.adoc +++ b/modules/ROOT/content-nav.adoc @@ -1,6 +1,7 @@ * xref:index.adoc[] * xref:errors/index.adoc[] ** xref:errors/all-errors.adoc[] +** xref:errors/gql-errors.adoc[] * xref:notifications/index.adoc[] ** xref:notifications/all-notifications.adoc[] * xref:changelogs.adoc[] diff --git a/modules/ROOT/pages/errors/gql-errors.adoc b/modules/ROOT/pages/errors/gql-errors.adoc new file mode 100644 index 00000000..7b270fc4 --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors.adoc @@ -0,0 +1,100 @@ +:description: This section describes the GQLSTATUS errors that Neo4j can return, grouped by category, and an example of when they can occur. + +[[neo4j-gqlstatus-errors]] += List of all GQLSTATUS server error codes + +//The following page provides an overview of all server errors in Neo4j, along with some scenarios and their possible solutions. +The following page provides an overview of all GQLSTATUS server error codes in Neo4j. +All errors in Neo4j have severity level `ERROR`. + +* <<_connection-exceptions, Connection exceptions>> + + +[[_connection-exceptions]] +== Connection exceptions + +Connection exceptions occur when the client 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. + +=== 08000 + +Status description:: error: connection exception + +=== 08007 + +Status description:: error: connection exception - transaction resolution unknown + +=== 08N00 + +Status description:: 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. + + +=== 08N01 + +Status description:: 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'. + +//Possible solutions: +//Either connect to the database directly using the driver or interactively with the `:use { $db }` command), or enable server-side routing by setting `dbms.routing.enabled=true` in the configuration. + +=== 08N02 + +Status description:: error: connection exception - unable to connect 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'. + +Example error description:: error: connection exception - unable to route to database. Unable to connect to database `my_db`. Server-side routing is disabled. Either connect to `my_db` directly, or enable server-side routing by setting 'dbms.routing.enabled=true'. + +//Possible solutions: +//Either connect to the database directly using the driver or interactively with the `:use { $db }` command), or enable server-side routing by setting `dbms.routing.enabled=true` in the configuration. + +=== 08N03 + +Status description:: error: connection exception - failed to write to graph. Failed to write to graph { $graph }. Check the defined access mode in both driver and database. + +=== 08N04 + +Status description:: error: unable to route use clause. Routing with { $clause } is not supported in embedded sessions. Connect to the database directly or try running the query using a Neo4j driver or the HTTP API. + +=== 08N05 + +Status description:: error: connection exception - unable to route administration command. Routing administration commands is not supported in embedded sessions. Connect to the system database directly or try running the query using a Neo4j driver or the HTTP API. + +=== 08N06 + +Status description:: error: connection exception - protocol error. General network protocol error. + +=== 08N07 + +Status description:: error: connection exception - not the leader. This member is not the leader. + +//Possible solutions: +//No write operations are allowed directly on this database. Connect to the leader directly or enable server-side routing by setting `dbms.routing.enabled=true` in the configuration. + +=== 08N08 + +Status description:: error: connection exception - database is read only. This database is read only on this server. + +=== 08N09 + +Status description:: error: connection exception - database unavailable. The database { $db } is currently unavailable. Check the database status. Retry your request at a later time. + +=== 08N10 + +Status description:: error: connection exception - invalid server state. The server is not in a state that can process a message of type: { $boltMsgType }. + +=== 08N11 + +Status description:: error: connection exception - request error. The request is invalid and could not be processed by the server. See cause for further details. + +=== 08N12 + +Status description:: error: connection exception - failed to parse bookmark. Failed to parse the supplied bookmark. Verify it is correct or check the debug log for more information. + +=== 08N13 + +Status description:: error: connection exception - database not up to requested bookmark. The database { $db } is not up to the requested bookmark { $transactionId1 }. The latest transaction ID is { $transactionId2 }. + +=== 08N14 + +Status description:: error: connection exception - alias chains are not permitted. Unable to provide a routing table for the database identifed by the alias { $alias1 } because the request comes from another alias { $alias2 } and alias chains are not permitted. + +=== 08N15 + +Status description:: error: connection exception - no such routing policy. Policy definition of the routing policy { $routingPolicy } could not be found. Verify that the spelling is correct. \ No newline at end of file diff --git a/modules/ROOT/pages/errors/index.adoc b/modules/ROOT/pages/errors/index.adoc index 4d6e4637..cc20f309 100644 --- a/modules/ROOT/pages/errors/index.adoc +++ b/modules/ROOT/pages/errors/index.adoc @@ -1,21 +1,92 @@ -:description: The Neo4j error codes for Neo4j version {neo4j-version}. - -[[error-codes]] +:description: The Neo4j error codes for Neo4j version. +[[neo4j-errors]] = Server errors -Error codes are Neo4j status codes returned by the server when the execution of a query fails. -They always have the severity level `ERROR`. -Errors are grouped based on the type of the error code: +// [role=label--version-5.25] +// [[gqlstatus-error-object]] +// == GQL-status error object + +// [[gqlstatus-standard-defined-codes]] +// === Standard-defined GQLSTATUS codes -Client errors:: - These errors are caused by the client and are usually related to the request itself. - Client errors have the prefix `Neo.ClientError`. +// .Standard-defined GQLSTATUS error codes +// [options="header", cols="<1s,<4"] +// [%collapsible] +// |=== +// |GQLSTATUS code | StatusDescription +// | 08000 | error: connection exception +// | 08007 | error: connection exception - transaction resolution unknown +// | 22000 | error: data exception +// | 22001 | error: data exception - string data, right truncation +// | 22003 | error: data exception - numeric value out of range. The numeric value `$value` is outside the required range. +// | 22004 | error: data exception - null value not allowed +// | 22007 | error: data exception - invalid date, time, or datetime format +// | 22008 | error: data exception - datetime field overflow +// | 22011 | error: data exception - substring error +// | 22012 | error: data exception - division by zero +// | 22015 | error: data exception - interval field overflow +// | 22018 | error: data exception - invalid character value for cast. The character value `$value` is an invalid argument for the specified cast. +// | 2201E | error: data exception - invalid argument for natural logarithm. The value `$value` is an invalid argument for the specified natural logarithm. +// | 2201F | error: data exception - invalid argument for power function. The value `$value` is an invalid argument for the specified power function. +// | 22027 | error: data exception - trim error +// | 2202F | error: data exception - array data, right truncation +// | 22G02 | error: data exception - negative limit value +// | 22G03 | error: data exception - invalid value type +// | 22G04 | error: data exception - values not comparable +// | 22G05 | error: data exception - invalid date, time, or datetime function field name +// | 22G06 | error: data exception - invalid datetime function value +// | 22G07 | error: data exception - invalid duration function field name +// | 22G0B | error: data exception - list data, right truncation +// | 22G0C | error: data exception - list element error +// | 22G0F | error: data exception - invalid number of paths or groups +// | 22G0H | error: data exception - invalid duration format. The duration format `$format` is invalid. +// | 22G0M | error: data exception - multiple assignments to a graph element property +// | 22G0N | error: data exception - number of node labels below supported minimum +// | 22G0P | error: data exception - number of node labels exceeds supported maximum +// | 22G0Q | error: data exception - number of edge labels below supported minimum +// | 22G0R | error: data exception - number of edge labels exceeds supported maximum +// | 22G0S | error: data exception - number of node properties exceeds supported maximum +// | 22G0T | error: data exception - number of edge properties exceeds supported maximum +// | 22G0U | error: data exception - record fields do not match +// | 22G0V | error: data exception - reference value, invalid base type +// | 22G0W | error: data exception - reference value, invalid constrained type +// | 22G0X | error: data exception - record data, field unassignable +// | 22G0Y | error: data exception - record data, field missing +// | 22G0Z | error: data exception - malformed path +// | 22G10 | error: data exception - path data, right truncation +// | 22G11 | error: data exception - reference value, referent deleted +// | 22G12 | error: data exception - invalid value type +// | 22G13 | error: data exception - invalid group variable value +// | 22G14 | error: data exception - incompatible temporal instant unit groups +// | 25000 | error: invalid transaction state +// | 25G01 | error: invalid transaction state - active GQL-transaction +// | 25G02 | error: invalid transaction state - catalog and data statement mixing not supported +// | 25G03 | error: invalid transaction state - read-only GQL-transaction +// | 25G04 | error: invalid transaction state - accessing multiple graphs not supported +// | 2D000 | error: invalid transaction termination +// | 40000 | error: transaction rollback +// | 40003 | error: transaction rollback - statement completion unknown +// | 42000 | error: syntax error or access rule violation +// | 42001 | error: syntax error or access rule violation - invalid syntax +// | 42002 | error: syntax error or access rule violation - invalid reference +// | 42004 | error: syntax error or access rule violation - use of visually confusable identifiers +// | 42006 | error: syntax error or access rule violation - number of edge labels below supported minimum +// | 42007 | error: syntax error or access rule violation - number of edge labels exceeds supported maximum +// | 42008 | error: syntax error or access rule violation - number of edge properties exceeds supported maximum +// | 42009 | error: syntax error or access rule violation - number of node labels below supported minimum +// | 42010 | error: syntax error or access rule violation - number of node labels exceeds supported maximum +// | 42011 | error: syntax error or access rule violation - number of node properties exceeds supported maximum +// | 42012 | error: syntax error or access rule violation - number of node type key labels below supported minimum +// | 42013 | error: syntax error or access rule violation - number of node type key labels exceeds supported maximum +// | 42014 | error: syntax error or access rule violation - number of edge type key labels below supported minimum +// | 42015 | error: syntax error or access rule violation - number of edge type key labels exceeds supported maximum +// | G1000 | error: dependent object error +// | G1001 | error: dependent object error - edges still exist +// | G1002 | error: dependent object error - endpoint node is deleted +// | G1003 | error: dependent object error - endpoint node not in current working graph +// | G2000 | error: graph type violation +// |=== -Transient errors:: - 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. - The error can be temporary and could therefore succeed if retrying the request. - Transient errors have the prefix `Neo.TransientError`. +// [[gqlstatus-neo4j-defined-codes]] +// === Neo4j-defined GQLSTATUS error codes -Database errors:: - These errors are caused by the database and are usually related to the database state. - Database errors have the prefix `Neo.DatabaseError`. \ No newline at end of file diff --git a/modules/ROOT/pages/index.adoc b/modules/ROOT/pages/index.adoc index 48b7d109..f24b4167 100644 --- a/modules/ROOT/pages/index.adoc +++ b/modules/ROOT/pages/index.adoc @@ -12,8 +12,12 @@ endif::[] This document details all status codes that a Neo4j DBMS may return to indicate the outcome of a request. +//== GQL status codes -== Format + +== Neo4j status codes + +=== Format Each Neo4j status code follows the same format: @@ -23,7 +27,7 @@ Neo.[Type].[SubType].[Name] ----- -== Types of Neo4j status codes +=== Types of Neo4j status codes The fact that a Neo4j status code is returned by the server does not always mean there is a fatal error. Neo4j status codes can also indicate transient problems that may go away if you retry the request. @@ -38,7 +42,7 @@ The type of the status code determines the effect on the transaction. | Effect on the transaction | xref:errors/all-errors.adoc#_client_errors[ClientError] -| The Client sent a bad request - changing the request might yield a successful outcome. +| The client sent a bad request - changing the request might yield a successful outcome. | Rollback | xref:errors/all-errors#_transient_errors[TransientError] diff --git a/modules/ROOT/pages/notifications/index.adoc b/modules/ROOT/pages/notifications/index.adoc index bb5ac24c..c0e3f4d7 100644 --- a/modules/ROOT/pages/notifications/index.adoc +++ b/modules/ROOT/pages/notifications/index.adoc @@ -93,6 +93,25 @@ Additional helper methods are exposed for some useful fields. !=== |=== +=== Standard-defined GQLSTATUS notification codes + +The GQL standard defines a set of GQLSTATUS codes that are used to represent successful completion, warnings, and informational messages. +The following table lists the standard-defined GQLSTATUS codes and their meanings: + +.Standard-defined GQLSTATUS notification codes +[options="header", cols="<1s,<4"] +|=== +|GQLSTATUS code | StatusDescription +| 00000 | note: successful completion +| 00001 | note: successful completion - omitted result +| 01000 | warn: warning +| 01004 | warn: string data, right truncation +| 01G03 | warn: graph does not exist +| 01G04 | warn: graph type does not exist +| 01G11 | warn: null value eliminated in set function +| 02000 | note: no data +| 03000 | info: informational +|=== [[general-codes-for-success]] === General codes for success @@ -306,9 +325,3 @@ Finally, the list of poly-filled GQL-status objects is sorted according to the G // The following table illustrates the compatibility between the different server and driver versions for both the current Notification API and the GqlStatusObject API: // TODO - - - - - ->>>>>>> gql-notifications