Skip to content

Commit eacd4c6

Browse files
committed
Update error codes in errno.py
1 parent b932ab3 commit eacd4c6

File tree

2 files changed

+163
-8
lines changed

2 files changed

+163
-8
lines changed

arango/backup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def get(self, backup_id: Optional[str] = None) -> Result[Json]:
2929
"""Return backup details.
3030
3131
:param backup_id: If set, details on only the specified backup is
32-
returned. Otherwise details on all backups are returned.
32+
returned. Otherwise, details on all backups are returned.
3333
:type backup_id: str
3434
:return: Backup details.
3535
:rtype: dict

arango/errno.py

Lines changed: 162 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@
104104
# Requested resource disabled.
105105
DISABLED = 36
106106

107+
# JSON string could not be parsed.
108+
MALFORMED_JSON = 37
109+
110+
# Call cannot succeed because the server startup phase is still in progress.
111+
STARTING_UP = 38
112+
107113
###########################
108114
# HTTP Error Status Codes #
109115
###########################
@@ -126,12 +132,24 @@
126132
# HTTP content type not supported.
127133
HTTP_NOT_ACCEPTABLE = 406
128134

135+
# Timeout occurred.
136+
HTTP_REQUEST_TIMEOUT = 408
137+
138+
# Conflict occurred in an HTTP operation.
139+
HTTP_CONFLICT = 409
140+
141+
# Requested content has been permanently deleted.
142+
HTTP_GONE = 410
143+
129144
# Precondition not met.
130145
HTTP_PRECONDITION_FAILED = 412
131146

132147
# Internal server error occurred.
133148
HTTP_SERVER_ERROR = 500
134149

150+
# API is not implemented.
151+
HTTP_NOT_IMPLEMENTED = 501
152+
135153
# Service temporarily unavailable.
136154
HTTP_SERVICE_UNAVAILABLE = 503
137155

@@ -378,6 +396,9 @@
378396
# Found unexpected transaction ID.
379397
REPLICATION_UNEXPECTED_TRANSACTION = 1408
380398

399+
# Synchronization of a shard takes longer than the configured timeout.
400+
REPLICATION_SHARD_SYNC_ATTEMPT_TIMEOUT_EXCEEDED = 1409
401+
381402
# Invalid replication applier configuration.
382403
REPLICATION_INVALID_APPLIER_CONFIGURATION = 1410
383404

@@ -399,13 +420,57 @@
399420
# Shard is not empty and follower tries a shortcut.
400421
REPLICATION_SHARD_NONEMPTY = 1417
401422

423+
# Specific replicated log is not found
424+
REPLICATION_REPLICATED_LOG_NOT_FOUND = 1418
425+
426+
# Participant of a replicated log is ordered to do something only the leader can do.
427+
REPLICATION_REPLICATED_LOG_NOT_THE_LEADER = 1419
428+
429+
# Participant of a replicated log is ordered to do something only a follower can do.
430+
REPLICATION_REPLICATED_LOG_NOT_A_FOLLOWER = 1420
431+
432+
# Follower of a replicated log rejects an append-entries request.
433+
REPLICATION_REPLICATED_LOG_APPEND_ENTRIES_REJECTED = 1421
434+
435+
# Leader instance of a replicated log rejects a request because it just resigned.
436+
# This can also happen if the term changes (due to a configuration change).
437+
REPLICATION_REPLICATED_LOG_LEADER_RESIGNED = 1422
438+
439+
# Follower instance of a replicated log rejects a request because it just resigned.
440+
# This can also happen if the term changes (due to a configuration change).
441+
REPLICATION_REPLICATED_LOG_FOLLOWER_RESIGNED = 1423
442+
443+
# Participant instance of a replicated log is no longer available.
444+
REPLICATION_REPLICATED_LOG_PARTICIPANT_GONE = 1424
445+
446+
# Participant tries to change its term but found an invalid new term.
447+
REPLICATION_REPLICATED_LOG_INVALID_TERM = 1425
448+
449+
# Participant is currently unconfigured.
450+
REPLICATION_REPLICATED_LOG_UNCONFIGURED = 1426
451+
452+
# Specific replicated state was not found.
453+
REPLICATION_REPLICATED_STATE_NOT_FOUND = 1427
454+
402455
###########################
403456
# ArangoDB Cluster Errors #
404457
###########################
405458

459+
# Operation is sent to a non-following server.
460+
CLUSTER_NOT_FOLLOWER = 1446
461+
462+
# Follower transaction already performed an intermediate commit and must be rolled back.
463+
CLUSTER_FOLLOWER_TRANSACTION_COMMIT_PERFORMED = 1447
464+
465+
# Updating the plan on collection creation failed.
466+
CLUSTER_CREATE_COLLECTION_PRECONDITION_FAILED = 1448
467+
406468
# Raised on some occasions when one server gets a request from another.
407469
CLUSTER_SERVER_UNKNOWN = 1449
408470

471+
# Number of shards for a collection is higher than allowed.
472+
CLUSTER_TOO_MANY_SHARDS = 1450
473+
409474
# Coordinator cannot create a collection as the collection ID already exists.
410475
CLUSTER_COLLECTION_ID_EXISTS = 1453
411476

@@ -571,6 +636,9 @@
571636
# Document attribute redeclared.
572637
QUERY_DOCUMENT_ATTRIBUTE_REDECLARED = 1530
573638

639+
# Unknown attribute is used inside an OPTIONS clause.
640+
QUERY_INVALID_OPTIONS_ATTRIBUTE = 1539
641+
574642
# Undefined function called.
575643
QUERY_FUNCTION_NAME_UNKNOWN = 1540
576644

@@ -604,9 +672,12 @@
604672
# Divide by zero.
605673
QUERY_DIVISION_BY_ZERO = 1562
606674

607-
# Non-list operand used when expecting an list operand.
675+
# Non-list operand used when expecting a list operand.
608676
QUERY_ARRAY_EXPECTED = 1563
609677

678+
# Collection is used as an operand in an AQL expression
679+
QUERY_COLLECTION_USED_IN_EXPRESSION = 1568
680+
610681
# Function "FAIL()" called inside a query.
611682
QUERY_FAIL_CALLED = 1569
612683

@@ -672,6 +743,9 @@
672743
# User provided expression does not evaluate to true.
673744
QUERY_USER_WARN = 1594
674745

746+
# Window node is created after a data-modification operation.
747+
QUERY_WINDOW_AFTER_MODIFICATION = 1595
748+
675749
##########################
676750
# ArangoDB Cursor Errors #
677751
##########################
@@ -821,7 +895,7 @@
821895
# Invalid filter result returned in graph traversal.
822896
GRAPH_INVALID_FILTER_RESULT = 1910
823897

824-
# Edge collection may only be used once in a edge definition.
898+
# Edge collection may only be used once in an edge definition.
825899
GRAPH_COLLECTION_MULTI_USE = 1920
826900

827901
# Collection already used by another graph in a different edge definition.
@@ -893,6 +967,26 @@
893967
# Collection used as a relation exists.
894968
GRAPH_EDGE_DEFINITION_IS_DOCUMENT = 1944
895969

970+
# The collection is used as the initial collection of this graph and is not allowed to
971+
# be removed manually.
972+
GRAPH_COLLECTION_IS_INITIAL = 1945
973+
974+
# During the graph creation process no collection could be selected as the needed
975+
# initial collection. Happens if a distributeShardsLike or replicationFactor mismatch
976+
# was found.
977+
GRAPH_NO_INITIAL_COLLECTION = 1946
978+
979+
# The _from or _to collection specified for the edge refers to a vertex collection which
980+
# is not used in any edge definition of the graph.
981+
GRAPH_REFERENCED_VERTEX_COLLECTION_NOT_USED = 1947
982+
983+
# Negative edge weight found during a weighted graph traversal or shortest path query.
984+
GRAPH_NEGATIVE_EDGE_WEIGHT = 1948
985+
986+
##################
987+
# Session Errors #
988+
##################
989+
896990
# Invalid/unknown session ID passed to the server.
897991
SESSION_UNKNOWN = 1950
898992

@@ -1046,6 +1140,13 @@
10461140
# Cannot update the value of the smart join attribute.
10471141
CLUSTER_MUST_NOT_CHANGE_SMART_JOIN_ATTRIBUTE = 4009
10481142

1143+
# There was an attempt to create an edge between separated graph components.
1144+
INVALID_DISJOINT_SMART_EDGE = 4010
1145+
1146+
# Switching back and forth between Satellite and Smart in Disjoint SmartGraph is not
1147+
# supported within a single AQL statement. Split into multiple statements.
1148+
UNSUPPORTED_CHANGE_IN_SMART_TO_SATELLITE_DISJOINT_EDGE_DIRECTION = 4011
1149+
10491150
#########################
10501151
# Cluster Repair Errors #
10511152
#########################
@@ -1089,6 +1190,12 @@
10891190
# Agency Errors #
10901191
#################
10911192

1193+
# Malformed gossip message.
1194+
AGENCY_MALFORMED_GOSSIP_MESSAGE = 20001
1195+
1196+
# Malformed inquire request.
1197+
AGENCY_MALFORMED_INQUIRE_REQUEST = 20002
1198+
10921199
# Inform message must be an object.
10931200
AGENCY_INFORM_MUST_BE_OBJECT = 20011
10941201

@@ -1116,20 +1223,26 @@
11161223
# Cannot rebuild readDB or the spearHead from replicated log.
11171224
AGENCY_CANNOT_REBUILD_DBS = 20021
11181225

1226+
# Malformed agency transaction.
1227+
AGENCY_MALFORMED_TRANSACTION = 20030
1228+
11191229
######################
11201230
# Supervision Errors #
11211231
######################
11221232

11231233
# General supervision failure.
11241234
SUPERVISION_GENERAL_FAILURE = 20501
11251235

1126-
#####################
1127-
# Dispatcher Errors #
1128-
#####################
1236+
####################
1237+
# Scheduler Errors #
1238+
####################
11291239

11301240
# Queue is full.
11311241
QUEUE_FULL = 21003
11321242

1243+
# Request with a queue time requirement is set and cannot be fulfilled.
1244+
QUEUE_TIME_REQUIREMENT_VIOLATED = 21004
1245+
11331246
######################
11341247
# Maintenance Errors #
11351248
######################
@@ -1171,14 +1284,56 @@
11711284
# Invalid remote repository configuration.
11721285
REMOTE_REPOSITORY_CONFIG_BAD = 7008
11731286

1174-
# Some of the db servers cannot be reached for transaction locks.
1287+
# Some DB servers cannot be reached for transaction locks.
11751288
LOCAL_LOCK_FAILED = 7009
11761289

1177-
# Some of the db servers cannot be reached for transaction locks.
1290+
# Some DB servers cannot be reached for transaction locks.
11781291
LOCAL_LOCK_RETRY = 7010
11791292

11801293
# Conflict of multiple hot backup processes.
11811294
HOT_BACKUP_CONFLICT = 7011
11821295

11831296
# One or more db servers could not be reached for hot backup inquiry.
11841297
HOT_BACKUP_DBSERVERS_AWOL = 7012
1298+
1299+
########################
1300+
# Plan Analyzer Errors #
1301+
########################
1302+
1303+
# Plan could not be modified while creating or deleting Analyzers revision.
1304+
ERROR_CLUSTER_COULD_NOT_MODIFY_ANALYZERS_IN_PLAN = 7021
1305+
1306+
##############
1307+
# AIR Errors #
1308+
##############
1309+
1310+
# During the execution of an AIR program an error occurred.
1311+
AIR_EXECUTION_ERROR = 8001
1312+
1313+
#############
1314+
# Licensing #
1315+
#############
1316+
1317+
# The license has expired or is invalid.
1318+
LICENSE_EXPIRED_OR_INVALID = 9001
1319+
1320+
# Verification of license failed.
1321+
LICENSE_SIGNATURE_VERIFICATION = 9002
1322+
1323+
# The ID of the license does not match the ID of this instance.
1324+
LICENSE_NON_MATCHING_ID = 9003
1325+
1326+
# The installed license does not cover this feature.
1327+
LICENSE_FEATURE_NOT_ENABLED = 9004
1328+
1329+
# The installed license does not cover a higher number of this resource.
1330+
LICENSE_RESOURCE_EXHAUSTED = 9005
1331+
1332+
# The license does not hold features of an ArangoDB license.
1333+
LICENSE_INVALID = 9006
1334+
1335+
# The license has one or more inferior features.
1336+
LICENSE_CONFLICT = 9007
1337+
1338+
# Could not verify the license’s signature.
1339+
LICENSE_VALIDATION_FAILED = 9008

0 commit comments

Comments
 (0)