0001-utils-allow-changing-APIError-attributes-38721.patch
passerelle/utils/jsonresponse.py | ||
---|---|---|
31 | 31 | |
32 | 32 |
class APIError(RuntimeError): |
33 | 33 |
'''Exception to raise when there is a remote application or business logic error.''' |
34 |
err = 1 |
|
35 |
log_error = False |
|
36 |
http_status = 200 |
|
37 | 34 | |
38 | 35 |
def __init__(self, *args, **kwargs): |
36 |
self.err = kwargs.pop('err', 1) |
|
37 |
self.log_error = kwargs.pop('log_error', False) |
|
38 |
self.http_status = kwargs.pop('http_status', 200) |
|
39 | 39 |
self.__dict__.update(kwargs) |
40 | 40 |
super(APIError, self).__init__(*args) |
41 | 41 | |
42 |
- |