From 5f14cbbbc3dbae79dff1a825b6505dc0b9b23baa Mon Sep 17 00:00:00 2001 From: OliviaYtterbrink Date: Thu, 30 Oct 2025 11:58:01 +0100 Subject: [PATCH 1/4] Add new error code for having a use clause with admin commands --- .../ROOT/pages/errors/gql-errors/42N79.adoc | 32 +++++++++++++++++++ .../ROOT/pages/errors/gql-errors/index.adoc | 4 +++ 2 files changed, 36 insertions(+) create mode 100644 modules/ROOT/pages/errors/gql-errors/42N79.adoc diff --git a/modules/ROOT/pages/errors/gql-errors/42N79.adoc b/modules/ROOT/pages/errors/gql-errors/42N79.adoc new file mode 100644 index 00000000..c84ec4e4 --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/42N79.adoc @@ -0,0 +1,32 @@ += 42N79 + +== Status description +error: syntax error or access rule violation - invalid `USE` clause. The `USE` clause is not required for Administration Commands. Retry the query omitting the USE clause and it will be routed automatically. + +== Explanation + +This error occurs when an administration commands is prepended with a `USE` clause. + +== Example scenario + +For example, try to show all the databases with a `USE` clause in the query: + +[source,cypher] +---- +USE system +SHOW DATABASES +---- + +Error message will be: + +[source] +---- +error: syntax error or access rule violation - invalid `USE` clause. The `USE` clause is not required for Administration Commands. Retry the query omitting the USE clause and it will be routed automatically. +---- + +ifndef::backend-pdf[] +[discrete.glossary] +== Glossary + +include::partial$glossary.adoc[] +endif::[] diff --git a/modules/ROOT/pages/errors/gql-errors/index.adoc b/modules/ROOT/pages/errors/gql-errors/index.adoc index f7808ec9..17c84ba5 100644 --- a/modules/ROOT/pages/errors/gql-errors/index.adoc +++ b/modules/ROOT/pages/errors/gql-errors/index.adoc @@ -1412,6 +1412,10 @@ Status description:: error: syntax error or access rule violation - missing hint Status description:: error: syntax error or access rule violation - variable already bound. Node `{ <> }` has already been bound and cannot be modified by the `{ <> }` clause. +=== xref:errors/gql-errors/42N79.adoc[42N79] + +Status description:: error: syntax error or access rule violation - invalid USE clause. The USE clause is not required for Administration Commands. Retry the query omitting the USE clause and it will be routed automatically. + === xref:errors/gql-errors/42N81.adoc[42N81] Status description:: error: syntax error or access rule violation - missing request parameter. Expected `{ <> }`, but got `{ <> }`. From 3740eff62c7ca01f7d8fa867a374828def74d01f Mon Sep 17 00:00:00 2001 From: OliviaYtterbrink Date: Thu, 30 Oct 2025 14:01:47 +0100 Subject: [PATCH 2/4] fixes from review comments --- modules/ROOT/content-nav.adoc | 1 + modules/ROOT/pages/errors/gql-errors/42N79.adoc | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/content-nav.adoc b/modules/ROOT/content-nav.adoc index 07478448..e867095b 100644 --- a/modules/ROOT/content-nav.adoc +++ b/modules/ROOT/content-nav.adoc @@ -344,6 +344,7 @@ **** xref:errors/gql-errors/42N76.adoc[] **** xref:errors/gql-errors/42N77.adoc[] **** xref:errors/gql-errors/42N78.adoc[] +**** xref:errors/gql-errors/42N79.adoc[] **** xref:errors/gql-errors/42N81.adoc[] **** xref:errors/gql-errors/42N82.adoc[] **** xref:errors/gql-errors/42N83.adoc[] diff --git a/modules/ROOT/pages/errors/gql-errors/42N79.adoc b/modules/ROOT/pages/errors/gql-errors/42N79.adoc index c84ec4e4..c883f4a2 100644 --- a/modules/ROOT/pages/errors/gql-errors/42N79.adoc +++ b/modules/ROOT/pages/errors/gql-errors/42N79.adoc @@ -1,11 +1,12 @@ +:page-role: new-2025.11 = 42N79 == Status description -error: syntax error or access rule violation - invalid `USE` clause. The `USE` clause is not required for Administration Commands. Retry the query omitting the USE clause and it will be routed automatically. +error: syntax error or access rule violation - invalid `USE` clause. The `USE` clause is not required for Administration Commands. Retry the query omitting the `USE` clause and it will be routed automatically. == Explanation -This error occurs when an administration commands is prepended with a `USE` clause. +This error occurs when an administration command is prepended with a `USE` clause. == Example scenario @@ -21,7 +22,7 @@ Error message will be: [source] ---- -error: syntax error or access rule violation - invalid `USE` clause. The `USE` clause is not required for Administration Commands. Retry the query omitting the USE clause and it will be routed automatically. +error: syntax error or access rule violation - invalid `USE` clause. The `USE` clause is not required for Administration Commands. Retry the query omitting the `USE` clause and it will be routed automatically. ---- ifndef::backend-pdf[] From 3375748be129bb1c5fa30312e60ddf2163a5491e Mon Sep 17 00:00:00 2001 From: OliviaYtterbrink Date: Mon, 10 Nov 2025 10:07:16 +0100 Subject: [PATCH 3/4] update according to changes done in the code pr --- modules/ROOT/pages/errors/gql-errors/42N79.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/pages/errors/gql-errors/42N79.adoc b/modules/ROOT/pages/errors/gql-errors/42N79.adoc index c883f4a2..8674a624 100644 --- a/modules/ROOT/pages/errors/gql-errors/42N79.adoc +++ b/modules/ROOT/pages/errors/gql-errors/42N79.adoc @@ -2,7 +2,7 @@ = 42N79 == Status description -error: syntax error or access rule violation - invalid `USE` clause. The `USE` clause is not required for Administration Commands. Retry the query omitting the `USE` clause and it will be routed automatically. +error: syntax error or access rule violation - invalid `USE` clause. The `USE` clause is not required for administration commands. Retry the query without the `USE` clause, and it will be routed automatically. == Explanation @@ -22,7 +22,7 @@ Error message will be: [source] ---- -error: syntax error or access rule violation - invalid `USE` clause. The `USE` clause is not required for Administration Commands. Retry the query omitting the `USE` clause and it will be routed automatically. +error: syntax error or access rule violation - invalid `USE` clause. The `USE` clause is not required for administration commands. Retry the query without the `USE` clause, and it will be routed automatically. ---- ifndef::backend-pdf[] From 127f188e6687f6c32c9a01b537075e2e91808ffe Mon Sep 17 00:00:00 2001 From: Reneta Popova Date: Mon, 10 Nov 2025 10:16:46 +0100 Subject: [PATCH 4/4] regenerate the index file --- modules/ROOT/pages/errors/gql-errors/index.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ROOT/pages/errors/gql-errors/index.adoc b/modules/ROOT/pages/errors/gql-errors/index.adoc index 17c84ba5..0b067a19 100644 --- a/modules/ROOT/pages/errors/gql-errors/index.adoc +++ b/modules/ROOT/pages/errors/gql-errors/index.adoc @@ -1412,9 +1412,10 @@ Status description:: error: syntax error or access rule violation - missing hint Status description:: error: syntax error or access rule violation - variable already bound. Node `{ <> }` has already been bound and cannot be modified by the `{ <> }` clause. +[role=label--new-2025.11] === xref:errors/gql-errors/42N79.adoc[42N79] -Status description:: error: syntax error or access rule violation - invalid USE clause. The USE clause is not required for Administration Commands. Retry the query omitting the USE clause and it will be routed automatically. +Status description:: error: syntax error or access rule violation - invalid `USE` clause. The `USE` clause is not required for administration commands. Retry the query without the `USE` clause, and it will be routed automatically. === xref:errors/gql-errors/42N81.adoc[42N81]