Skip to content

Commit

Permalink
Sync errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fantix committed May 26, 2023
1 parent 5bc5699 commit 03e4012
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions edgedb/errors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
'DuplicateFunctionDefinitionError',
'DuplicateConstraintDefinitionError',
'DuplicateCastDefinitionError',
'DuplicateMigrationError',
'SessionTimeoutError',
'IdleSessionTimeoutError',
'QueryTimeoutError',
Expand All @@ -78,6 +79,7 @@
'DivisionByZeroError',
'NumericOutOfRangeError',
'AccessPolicyError',
'QueryAssertionError',
'IntegrityError',
'ConstraintViolationError',
'CardinalityViolationError',
Expand All @@ -86,6 +88,7 @@
'TransactionConflictError',
'TransactionSerializationError',
'TransactionDeadlockError',
'WatchError',
'ConfigurationError',
'AccessError',
'AuthenticationError',
Expand Down Expand Up @@ -328,12 +331,17 @@ class DuplicateCastDefinitionError(DuplicateDefinitionError):
_code = 0x_04_05_02_0A


class DuplicateMigrationError(DuplicateDefinitionError):
_code = 0x_04_05_02_0B


class SessionTimeoutError(QueryError):
_code = 0x_04_06_00_00


class IdleSessionTimeoutError(SessionTimeoutError):
_code = 0x_04_06_01_00
tags = frozenset({SHOULD_RETRY})


class QueryTimeoutError(SessionTimeoutError):
Expand Down Expand Up @@ -368,6 +376,10 @@ class AccessPolicyError(InvalidValueError):
_code = 0x_05_01_00_03


class QueryAssertionError(InvalidValueError):
_code = 0x_05_01_00_04


class IntegrityError(ExecutionError):
_code = 0x_05_02_00_00

Expand Down Expand Up @@ -403,6 +415,10 @@ class TransactionDeadlockError(TransactionConflictError):
tags = frozenset({SHOULD_RETRY})


class WatchError(ExecutionError):
_code = 0x_05_04_00_00


class ConfigurationError(EdgeDBError):
_code = 0x_06_00_00_00

Expand Down

0 comments on commit 03e4012

Please sign in to comment.