2626from tenacity import RetryError
2727
2828
29- ###############################################################################
30-
3129class DeepomaticException (Exception ):
3230 def __init__ (self , msg ):
3331 super (DeepomaticException , self ).__init__ (msg )
3432
35- ###############################################################################
36-
3733
3834class CredentialsNotFound (DeepomaticException ):
3935 pass
4036
4137
42- ###############################################################################
43-
4438class UnimplementedException (DeepomaticException ):
4539 def __init__ (self , msg ):
4640 super (UnimplementedException , self ).__init__ (msg )
4741
4842
49- ###############################################################################
50-
5143class NoData (DeepomaticException ):
5244 def __init__ (self ):
5345 super (NoData , self ).__init__ ("No data !! You may need to call '.retrieve()' ?" )
5446
5547
56- ###############################################################################
57-
5848class BadStatus (DeepomaticException ):
5949 """
6050 Thrown when HTTP response status_code < 200 or status_code >= 300.
@@ -93,8 +83,6 @@ class ServerError(BadStatus):
9383 pass
9484
9585
96- ###############################################################################
97-
9886class TaskError (DeepomaticException ):
9987 def __init__ (self , task ):
10088 self .task = task
@@ -106,8 +94,6 @@ def get_task_id(self):
10694 return self .task ['id' ]
10795
10896
109- ###############################################################################
110-
11197class TaskTimeout (DeepomaticException ):
11298 def __init__ (self , task , retry_error = None ):
11399 self .task = task
@@ -120,9 +106,6 @@ def get_task_id(self):
120106 return self .task ['id' ]
121107
122108
123- ###############################################################################
124-
125-
126109class HTTPRetryError (RetryError ):
127110 pass
128111
0 commit comments