Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/how-to/errors.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ Each row gives one hint, and a code that has more than one cause has a row for e

| `query_not_idempotent`
| `ArcadeDBError`
| `QueryNotIdempotentException`
| `QueryNotIdempotentException`, `ReadOnlyScope$WriteRefusedException`
| `db.query` runs reads only: send a statement that changes data with `db.command`.

| `missing_parameter`
Expand Down
5 changes: 4 additions & 1 deletion src/arcadedb/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,10 @@ class _Rule(NamedTuple):
"query_not_idempotent",
ArcadeDBError,
"`db.query` runs reads only: send a statement that changes data with `db.command`.",
java=(_E + "QueryNotIdempotentException",),
java=(
_E + "QueryNotIdempotentException",
"com.arcadedb.database.ReadOnlyScope$WriteRefusedException",
),
),
_Rule(
"missing_parameter",
Expand Down
13 changes: 13 additions & 0 deletions tests/test_error_codes_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,19 @@
"query_not_idempotent",
E + "QueryNotIdempotentException",
),
(
"query_not_idempotent",
"Query failed: com.arcadedb.database.ReadOnlyScope$WriteRefusedException: a read-only scope refused a write",
[
(
"com.arcadedb.database.ReadOnlyScope$WriteRefusedException",
"a read-only scope refused a write",
)
],
"ArcadeDBError",
"query_not_idempotent",
"com.arcadedb.database.ReadOnlyScope$WriteRefusedException",
),
(
"missing_parameter",
"Query failed: com.arcadedb.exception.CommandParameterMissingException: Expected parameter(s): x",
Expand Down
Loading