diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-06-26 12:27:51 +0200 |
|---|---|---|
| committer | Georgios Andreadis <info@gandreadis.com> | 2020-06-26 12:27:51 +0200 |
| commit | 19bede4fc7f7320bb4eb16c3fe1a211b19ab4714 (patch) | |
| tree | 6a53629feb7bd8c7a9380d204287f3429ed2f378 /opendc/util/rest.py | |
| parent | 92b94b59ad80329a2c99471edbf5bbdc9af1e525 (diff) | |
Revamp error responses everywhere
Diffstat (limited to 'opendc/util/rest.py')
| -rw-r--r-- | opendc/util/rest.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/opendc/util/rest.py b/opendc/util/rest.py index e70998a8..dc5478de 100644 --- a/opendc/util/rest.py +++ b/opendc/util/rest.py @@ -6,7 +6,7 @@ import sys from oauth2client import client, crypt from opendc.util import exceptions, parameter_checker -from opendc.util.exceptions import ClientRequestError +from opendc.util.exceptions import ClientError class Request(object): @@ -75,7 +75,7 @@ class Request(object): try: parameter_checker.check(self, **kwargs) except exceptions.ParameterError as e: - raise ClientRequestError(Response(400, str(e))) + raise ClientError(Response(400, str(e))) def process(self): """Process the Request and return a Response.""" @@ -84,7 +84,7 @@ class Request(object): try: response = method(self) - except ClientRequestError as e: + except ClientError as e: e.response.id = self.id return e.response |
