File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -255,6 +255,12 @@ def get_error_status_code(error):
255
255
else :
256
256
raise labelbox .exceptions .InternalServerError (message )
257
257
258
+ not_allowed_error = check_errors (["OPERATION_NOT_ALLOWED" ],
259
+ "extensions" , "code" )
260
+ if not_allowed_error is not None :
261
+ message = not_allowed_error .get ("message" )
262
+ raise labelbox .exceptions .OperationNotAllowedException (message )
263
+
258
264
if len (errors ) > 0 :
259
265
logger .warning ("Unparsed errors on query execution: %r" , errors )
260
266
raise labelbox .exceptions .LabelboxError ("Unknown error: %s" %
Original file line number Diff line number Diff line change @@ -112,4 +112,9 @@ class InconsistentOntologyException(Exception):
112
112
113
113
class MALValidationError (LabelboxError ):
114
114
"""Raised when user input is invalid for MAL imports."""
115
- ...
115
+ pass
116
+
117
+
118
+ class OperationNotAllowedException (Exception ):
119
+ """Raised when user does not have permissions to a resource or has exceeded usage limit"""
120
+ pass
You can’t perform that action at this time.
0 commit comments