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 |
def __init__(self, *args, **kwargs): |
|
35 |
def __init__(self, *args, err=1, log_error=False, http_status=200, **kwargs): |
|
36 |
self.err = err |
|
37 |
self.log_error = log_error |
|
38 |
self.http_status = http_status |
|
39 | 39 |
self.__dict__.update(kwargs) |
40 | 40 |
super(APIError, self).__init__(*args) |
41 | 41 | |
42 |
- |