mirror of
https://github.com/clearml/clearml-server
synced 2025-01-31 10:56:48 +00:00
22 lines
440 B
Python
22 lines
440 B
Python
class APIError(Exception):
|
|
def __init__(self, msg, code=500, subcode=0, **_):
|
|
super(APIError, self).__init__()
|
|
self._msg = msg
|
|
self._code = code
|
|
self._subcode = subcode
|
|
|
|
@property
|
|
def msg(self):
|
|
return self._msg
|
|
|
|
@property
|
|
def code(self):
|
|
return self._code
|
|
|
|
@property
|
|
def subcode(self):
|
|
return self._subcode
|
|
|
|
def __str__(self):
|
|
return self.msg
|