Skip to content

Commit ec3e69c

Browse files
phil198Hunternessrenetapopova
authored
adding error codes for ABAC metadata function (#390)
adding 42N0D, 42N0E, 42N0F introduced in [PR.](neo-technology/neo4j#32943) Relates [to this core PR.](neo-technology/neo4j#32943). To be merged when feature flag removed and feature goes GA. ❗ Before we merge this PR, we need to update the `:page-role: new-2025.10 ` and regenerate the index.adoc file. --------- Co-authored-by: Therese Magnusson <[email protected]> Co-authored-by: Reneta Popova <[email protected]>
1 parent d40e248 commit ec3e69c

File tree

5 files changed

+75
-0
lines changed

5 files changed

+75
-0
lines changed

modules/ROOT/content-nav.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,9 @@
295295
**** xref:errors/gql-errors/42N09.adoc[]
296296
**** xref:errors/gql-errors/42N0A.adoc[]
297297
**** xref:errors/gql-errors/42N0B.adoc[]
298+
**** xref:errors/gql-errors/42N0D.adoc[]
299+
**** xref:errors/gql-errors/42N0E.adoc[]
300+
**** xref:errors/gql-errors/42N0F.adoc[]
298301
**** xref:errors/gql-errors/42N10.adoc[]
299302
**** xref:errors/gql-errors/42N11.adoc[]
300303
**** xref:errors/gql-errors/42N12.adoc[]
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
= 42N0D
2+
3+
4+
== Status description
5+
6+
error: syntax error or access rule violation - cannot call function from this context. The function `{ <<fun>> }` cannot be called from the current context. It can only be used `{ <<context>> }`.
7+
8+
== Explanation
9+
This error is thrown when a function is called from a context that is not allowed for that function.
10+
11+
== Example scenario
12+
13+
Try to call an internal security function like `abac.oidc.user_attribute()` from a regular Cypher query.
14+
You will get this error because it is not supported in user Cypher queries and can only be called from within `AUTH RULE` creation or alteration commands.
15+
16+
17+
ifndef::backend-pdf[]
18+
[discrete.glossary]
19+
== Glossary
20+
21+
include::partial$glossary.adoc[]
22+
endif::[]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
= 42N0E
2+
3+
4+
== Status description
5+
6+
error: syntax error or access rule violation - cannot call function without metadata. The function `{ <<fun>> }` cannot be called without metadata.
7+
8+
== Explanation
9+
This error occurs when the metadata required by the function is missing from the context supplied. This is an internal error which would only ever appear in the logs.
10+
11+
== Example scenario
12+
A function is called without the required metadata.
13+
14+
ifndef::backend-pdf[]
15+
[discrete.glossary]
16+
== Glossary
17+
18+
include::partial$glossary.adoc[]
19+
endif::[]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
= 42N0F
2+
3+
4+
== Status description
5+
6+
error: syntax error or access rule violation - cannot call function without metadata for realm. The function `{ <<fun>> }` cannot be called without metadata for realm: `{ <<auth>> }`.
7+
8+
== Explanation
9+
This error occurs when the metadata for a specific security realm is missing from the context supplied. This is an internal error which would only ever appear in the logs.
10+
11+
== Example scenario
12+
A function is called with a metadata dictionary, but there is no entry for the required realm.
13+
14+
ifndef::backend-pdf[]
15+
[discrete.glossary]
16+
== Glossary
17+
18+
include::partial$glossary.adoc[]
19+
endif::[]

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,6 +1195,18 @@ Status description:: error: syntax error or access rule violation - invalid shar
11951195

11961196
Status description:: error: syntax error or access rule violation - cannot replace sharded database. The database identified by `{ <<db>>1 }` is sharded. Drop the database `{ <<db>>2 }` before recreating.
11971197

1198+
=== xref:errors/gql-errors/42N0D.adoc[42N0D]
1199+
1200+
Status description:: error: syntax error or access rule violation - cannot call function from this context. The function `{ <<fun>> }` cannot be called from the current context. It can only be used `{ <<context>> }`.
1201+
1202+
=== xref:errors/gql-errors/42N0E.adoc[42N0E]
1203+
1204+
Status description:: error: syntax error or access rule violation - cannot call function without metadata. The function `{ <<fun>> }` cannot be called without metadata.
1205+
1206+
=== xref:errors/gql-errors/42N0F.adoc[42N0F]
1207+
1208+
Status description:: error: syntax error or access rule violation - cannot call function without metadata for realm. The function `{ <<fun>> }` cannot be called without metadata for realm: `{ <<auth>> }`.
1209+
11981210
=== xref:errors/gql-errors/42N10.adoc[42N10]
11991211

12001212
Status description:: error: syntax error or access rule violation - no such role. A role with the name `{ <<role>> }` was not found. Verify that the spelling is correct.

0 commit comments

Comments
 (0)