Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GQL framework #212

Merged
merged 29 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5f79778
Swamp the lagacy and the GQL code tab examples
renetapopova Oct 30, 2024
b1ce2dd
add info about deprecated notification api and swap the code examples
renetapopova Nov 1, 2024
0390d21
Add more information to the gql frameworks
renetapopova Nov 5, 2024
43146bd
Update modules/ROOT/pages/errors/all-errors.adoc
renetapopova Nov 20, 2024
84b493d
Update modules/ROOT/pages/errors/all-errors.adoc
renetapopova Nov 20, 2024
60a20fc
Update modules/ROOT/pages/errors/all-errors.adoc
renetapopova Nov 20, 2024
724455f
Update modules/ROOT/pages/errors/all-errors.adoc
renetapopova Nov 20, 2024
fffb8ee
Update modules/ROOT/pages/errors/all-errors.adoc
renetapopova Nov 20, 2024
ccdd1c3
Update modules/ROOT/pages/errors/all-errors.adoc
renetapopova Nov 20, 2024
8214062
Update modules/ROOT/pages/index.adoc
renetapopova Nov 20, 2024
07dab7d
apply some feedback from reviews
renetapopova Nov 25, 2024
6e7b231
remove legacy and further updates
renetapopova Nov 27, 2024
77b843e
remove server from headings
renetapopova Nov 27, 2024
e666f2e
Update modules/ROOT/pages/errors/index.adoc
renetapopova Nov 28, 2024
edb0d38
Further updates based on feedback
renetapopova Nov 28, 2024
0a43d3d
fix the link to the Cypher Manual
renetapopova Nov 28, 2024
9097481
Update modules/ROOT/pages/errors/all-errors.adoc
renetapopova Nov 29, 2024
9be9ba0
Update modules/ROOT/pages/errors/all-errors.adoc
renetapopova Nov 29, 2024
92a67c4
Update modules/ROOT/pages/errors/all-errors.adoc
renetapopova Nov 29, 2024
a2940f0
Update modules/ROOT/pages/errors/all-errors.adoc
renetapopova Nov 29, 2024
5734458
Update modules/ROOT/pages/errors/index.adoc
renetapopova Nov 29, 2024
d27ad0e
Update modules/ROOT/pages/index.adoc
renetapopova Nov 29, 2024
d7a7eff
Update modules/ROOT/pages/notifications/all-notifications.adoc
renetapopova Nov 29, 2024
3addd2d
Update modules/ROOT/pages/notifications/all-notifications.adoc
renetapopova Nov 29, 2024
dffd078
Update modules/ROOT/pages/notifications/index.adoc
renetapopova Nov 29, 2024
9c409e8
Update modules/ROOT/pages/errors/index.adoc
renetapopova Nov 29, 2024
4f63dfd
Update modules/ROOT/pages/errors/index.adoc
renetapopova Nov 29, 2024
18db250
apply suggestions from review
renetapopova Nov 29, 2024
b772532
remove DBMS
renetapopova Nov 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

= docs-status-codes

This repository contains the AsciiDoc and other sources to build the link:{docs-uri}/status-codes[Neo4j Status Codes].
This repository contains the AsciiDoc and other sources to build the link:{docs-uri}/status-codes[Status Codes for Errors & Notifications].

[[local-build]]
== Installation
Expand Down
2 changes: 1 addition & 1 deletion antora.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: status-codes
title: Status Codes
title: Status Codes for Errors & Notifications
version: '5'
start_page: ROOT:index.adoc
nav:
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/content-nav.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
* xref:index.adoc[]
* xref:errors/index.adoc[]
** xref:errors/all-errors.adoc[]
** xref:errors/gql-errors.adoc[]
** xref:errors/all-errors.adoc[]
* xref:notifications/index.adoc[]
** xref:notifications/all-notifications.adoc[]
* xref:changelogs.adoc[]
Expand Down
5 changes: 5 additions & 0 deletions modules/ROOT/pages/changelogs.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
:description: This page lists all changes to status codes per Neo4j version.
= Changes to status codes per Neo4j version

== Neo4j 5.25

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

== Neo4j 5.24

**New:**
Expand Down
29 changes: 24 additions & 5 deletions modules/ROOT/pages/errors/all-errors.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
:description: The Neo4j error codes for Neo4j version {neo4j-version}.
:description: The error codes for Neo4j 5.
renetapopova marked this conversation as resolved.
Show resolved Hide resolved


[[neo4j-errors]]
= List of all server error codes
= List of Neo4j error codes

This page lists the current Neo4j error codes, which which are returned along side xref:errors/gql-errors.adoc[GQLSTATUS error codes].

Error codes are 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 Neo4j code:

Client errors::
These errors are caused by the client (user input or user application) and are usually related to the request itself.
renetapopova marked this conversation as resolved.
Show resolved Hide resolved
The Neo4j codes for client errors have the prefix `Neo.ClientError`.

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 the request could succeed if retried.
The Neo4j codes for transient errors have the prefix `Neo.TransientError`.

Database errors::
These errors are caused by the database and are usually related to the database state.
The Neo4j codes for database errors have the prefix `Neo.DatabaseError`.

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

Expand All @@ -13,7 +32,7 @@ This is a complete list of all client errors Neo4j may return, and what they mea
[options="header", cols="<1m,<1"]
|===

| Neo4j status code
| Neo4j code
| Description

| Neo.ClientError.ChangeDataCapture.InvalidIdentifier
Expand Down Expand Up @@ -279,7 +298,7 @@ This is a complete list of all transient errors Neo4j may return, and what they
[options="header", cols="<1m,<1"]
|===

| Neo4j status code
| Neo4j code
| Description

| Neo.TransientError.ChangeDataCapture.FutureIdentifier
Expand Down Expand Up @@ -386,7 +405,7 @@ This is a complete list of all database errors Neo4j may return, and what they m
[options="header", cols="<1m,<1"]
|===

| Neo4j status code
| Neo4j code
| Description

| Neo.DatabaseError.ChangeDataCapture.Disabled
Expand Down
4 changes: 2 additions & 2 deletions modules/ROOT/pages/errors/gql-errors.adoc
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
: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
= List of GQLSTATUS 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 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.
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.

=== 08000

Expand Down
294 changes: 207 additions & 87 deletions modules/ROOT/pages/errors/index.adoc

Large diffs are not rendered by default.

67 changes: 9 additions & 58 deletions modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -1,72 +1,23 @@

[[status-codes]]
ifdef::backend-pdf[]
= Neo4j 5 Status Codes
= Status Codes for Errors and Notifications
endif::[]
ifndef::backend-pdf[]
= Introduction
endif::[]
:description: The Neo4j status codes for Neo4j version {neo4j-version}.
:description: Status codes for errors and notifications Neo4j 5
:neo4j-buildnumber: {neo4j-version}

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

This document details all status codes that a Neo4j DBMS may return to indicate the outcome of a request.
Starting from 5.23 for notifications and 5.25 for errors, Neo4j supports the GQL standard. +
GQL is the new link:https://www.iso.org/home.html[ISO] International Standard query language for graph databases.
Cypher®, Neo4j’s query language, supports most mandatory and a substantial portion of the optional GQL features (as defined by the link:https://www.iso.org/standard/76120.html[ISO/IEC 39075:2024(en) - Information technology - Database languages - GQL Standard]).
For more information, see link:https://neo4j.com/docs/cypher-manual/current/appendix/gql-conformance/[Cypher Manual -> GQL conformance].

//== GQL status codes


== Neo4j status codes

=== Format

Each Neo4j status code follows the same format:

[source, status code format, role="noheader"]
-----
Neo.[Type].[SubType].[Name]
-----


=== 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.
The type of the status code determines the effect on the transaction.

.Neo4j status code types
[options="header", cols="<1m,<2,<1"]
|===

| Type
| Description
| 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.
| Rollback

| xref:errors/all-errors#_transient_errors[TransientError]
| The database cannot service the request right now, retrying later might yield a successful outcome.
| Rollback

| xref:errors/all-errors#_database_error[DatabaseError]
| The database failed to service the request.
| Rollback

| xref:notifications/index.adoc[ClientNotifications]
| The query execution was successful, but there are notifications about the request sent by the client.
| None

|===

[NOTE]
====
From version 5.23, Neo4j has a new GqlStatusObject API in addition to the existing Notification API.

The GqlStatusObject API provides information about the status of a Cypher query or command execution in compliance with the GQL standard.
It includes GQLSTATUS code, StatusDescription, and DiagnosticRecord.
For more information, see xref:notifications/index.adoc#gqlstatus-notification-object[GQL-status notification object].
====
As part of this GQL compliance, Cypher also includes status codes that a GQL-compliant DBMS returns to indicate the outcome of a request.
For more information on the GQL-status object framework for notifications and errors, see xref:notifications/index.adoc[] and xref:errors/index.adoc[].

ifndef::backend-pdf[]
License: link:{common-license-page-uri}[Creative Commons 4.0]
Expand Down
Loading