2019-12-27 18:50:03 +00:00
|
|
|
from crc import ma
|
|
|
|
|
|
|
|
|
2020-02-10 21:19:23 +00:00
|
|
|
class ApiError(Exception):
|
2019-12-27 18:50:03 +00:00
|
|
|
def __init__(self, code, message):
|
|
|
|
self.code = code
|
|
|
|
self.message = message
|
|
|
|
|
|
|
|
|
|
|
|
class ApiErrorSchema(ma.Schema):
|
|
|
|
class Meta:
|
|
|
|
fields = ("code", "message")
|
|
|
|
|