summaryrefslogtreecommitdiff
path: root/opendc/util/exceptions.py
diff options
context:
space:
mode:
authorjc0b <j@jc0b.computer>2020-06-26 12:30:16 +0200
committerjc0b <j@jc0b.computer>2020-06-26 12:30:16 +0200
commitf1017676a150de60b13ff2b33ca83079d87aebfc (patch)
tree15c84fd426f65d54c70d405b9a2fc82b579c2812 /opendc/util/exceptions.py
parent6f51282cd7c3945ddd0fac68407a7a7be57aa2ba (diff)
parent19bede4fc7f7320bb4eb16c3fe1a211b19ab4714 (diff)
Merged refactoring changes with upstream
Diffstat (limited to 'opendc/util/exceptions.py')
-rw-r--r--opendc/util/exceptions.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/opendc/util/exceptions.py b/opendc/util/exceptions.py
index caf6dd8e..2563c419 100644
--- a/opendc/util/exceptions.py
+++ b/opendc/util/exceptions.py
@@ -55,3 +55,11 @@ class MissingParameterError(ParameterError):
self.parameter_name = parameter_name
self.parameter_location = parameter_location
+
+
+class ClientError(Exception):
+ """Raised when a 4xx response is to be returned."""
+
+ def __init__(self, response):
+ super(ClientError, self).__init__(str(response))
+ self.response = response