Skip to content

Commit 798b65b

Browse files
author
Jeroen van der Heijden
committed
Added exception to proto
1 parent a3ebfd1 commit 798b65b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

thingsdb/client/protocol.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from ..exceptions import AssertionError
88
from ..exceptions import AuthError
99
from ..exceptions import BadDataError
10+
from ..exceptions import CancelledError
1011
from ..exceptions import CustomError
1112
from ..exceptions import ForbiddenError
1213
from ..exceptions import InternalError
@@ -56,6 +57,7 @@ class Err(enum.IntEnum):
5657
"""ThingsDB error codes."""
5758

5859
# ThingsDB build-in errors
60+
EX_CANCELLED_ERROR = -64
5961
EX_OPERATION_ERROR = -63
6062
EX_NUM_ARGUMENTS = -62
6163
EX_TYPE_ERROR = -61
@@ -81,6 +83,7 @@ class Err(enum.IntEnum):
8183

8284

8385
_ERRMAP = {
86+
Err.EX_CANCELLED_ERROR: CancelledError,
8487
Err.EX_OPERATION_ERROR: OperationError,
8588
Err.EX_NUM_ARGUMENTS: NumArgumentsError,
8689
Err.EX_TYPE_ERROR: TypeError,

0 commit comments

Comments
 (0)