Skip to content

Commit 0219f23

Browse files
renetapopovaLojjs
andauthored
Clarify that 42NA8 might show sub-commands (#348) (#350)
This came out of a discussion here neo-technology/neo4j#31828 (comment) --------- Co-authored-by: Louise Berglund <[email protected]>
1 parent 908e01b commit 0219f23

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

modules/ROOT/pages/errors/gql-errors/42NA8.adoc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,38 @@
33
== Status description
44
error: syntax error or access rule violation - invalid reference in command. Invalid reference in command `{ <<cmd>> }`.
55

6+
== Explanation
7+
8+
This error occurs as the cause of other exceptions, for example, when you try to:
9+
10+
* Grant or deny privileges to, or revoke privileges from, a role that does not exist.
11+
* Grant or deny privileges to, or revoke privileges from, a role to perform administration commands on a database that does not exist.
12+
* Revoke a role from a user in Cypher 25, where either the role or the user does not exist.
13+
In Cypher 5, this last example gives a notification instead, see xref:notifications/all-notifications.adoc#_neo_clientnotification_security_impossiblerevokecommand[Impossible revoke command].
14+
15+
== Example scenario
16+
17+
For example, given that `role1` exists but `role2` does not, try to grant a privilege to both roles:
18+
19+
[source,cypher]
20+
----
21+
GRANT WRITE ON GRAPH * TO role1, role2
22+
----
23+
24+
[source]
25+
----
26+
error: syntax error or access rule violation - invalid reference in command. Invalid reference in command `GRANT WRITE ON GRAPH * NODES * TO role2`.
27+
----
28+
29+
The command returns an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001] and a cause with this GQLSTATUS 42NA8 and the status description above.
30+
The cause has a subsequent cause with GQLSTATUS xref:errors/gql-errors/42N10.adoc[42N10].
31+
32+
[NOTE]
33+
====
34+
The command in the status description might not be the exact command you typed.
35+
Internally, the Neo4j administration commands are separated into more specific sub-commands, and the Cypher shown corresponds to the sub-command that was executed when the error occurred.
36+
====
37+
638
ifndef::backend-pdf[]
739
[discrete.glossary]
840
== Glossary

0 commit comments

Comments
 (0)