Skip to content

Commit 8b25629

Browse files
Add new error code for having a use clause with admin commands
1 parent f70803b commit 8b25629

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
= 42N79
2+
3+
== Status description
4+
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.
5+
6+
== Explanation
7+
8+
This error occurs when an administration commands is prepended with a `USE` clause.
9+
10+
== Example scenario
11+
12+
For example, try to show all the databases with a `USE` clause in the query:
13+
14+
[source,cypher]
15+
----
16+
USE system
17+
SHOW DATABASES
18+
----
19+
20+
Error message will be:
21+
22+
[source]
23+
----
24+
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.
25+
----
26+
27+
ifndef::backend-pdf[]
28+
[discrete.glossary]
29+
== Glossary
30+
31+
include::partial$glossary.adoc[]
32+
endif::[]

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,6 +1401,10 @@ Status description:: error: syntax error or access rule violation - missing hint
14011401

14021402
Status description:: error: syntax error or access rule violation - variable already bound. Node `{ <<variable>> }` has already been bound and cannot be modified by the `{ <<clause>> }` clause.
14031403

1404+
=== xref:errors/gql-errors/42N79.adoc[42N79]
1405+
1406+
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.
1407+
14041408
=== xref:errors/gql-errors/42N81.adoc[42N81]
14051409

14061410
Status description:: error: syntax error or access rule violation - missing request parameter. Expected `{ <<param>> }`, but got `{ <<paramList>> }`.

0 commit comments

Comments
 (0)