Skip to content
Merged
Changes from 2 commits
Commits
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
29 changes: 29 additions & 0 deletions modules/ROOT/pages/errors/gql-errors/42NA8.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,37 @@
= 42NA8

== Status description
error: syntax error or access rule violation - invalid reference in command. Invalid reference in command `{ <<cmd>> }`.

== Explanation
This error occurs as the cause of other exceptions, for example, when trying to grant or deny privileges to, or revoke privileges from, a role that does not exist.
Another example is when you try to grant or deny privileges to, or revoke privileges from, a role to perform administration commands on a database that does not exist.
A third example is when you try to revoke a role from a user in Cypher 25, where either the role or the user does not exist.
In Cypher 5, this last example will instead give a notification, see xref:notifications/all-notifications.adoc/#_neo_clientnotification_security_impossiblerevokecommand[Impossible revoke command].

== Example scenario

For example, given that `role1` exists but `role2` does not, try to grant a privilege to both roles:

[source,cypher]
----
GRANT WRITE ON GRAPH * TO role1, role2
----

[source]
----
error: syntax error or access rule violation - invalid reference in command. Invalid reference in command `GRANT WRITE ON GRAPH * NODES * TO role2`.
----

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.
The cause has a subsequent cause with GQLSTATUS xref:errors/gql-errors/42N10.adoc[42N10].

[NOTE]
====
The command in the status description might not be the exact command you typed.
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.
====

ifndef::backend-pdf[]
[discrete.glossary]
== Glossary
Expand Down
Loading