From 2849c82255b4b889c7342a0a8fa8a4aecfbe599d Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Sat, 17 Jan 2015 16:50:38 +0100 Subject: a first big refacto of the existing arch --- pyaggr3g470r/lib/exceptions.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pyaggr3g470r/lib/exceptions.py (limited to 'pyaggr3g470r/lib/exceptions.py') diff --git a/pyaggr3g470r/lib/exceptions.py b/pyaggr3g470r/lib/exceptions.py new file mode 100644 index 00000000..30c71a5c --- /dev/null +++ b/pyaggr3g470r/lib/exceptions.py @@ -0,0 +1,13 @@ +class PyAggError(Exception): + status_code = None + default_message = '' + + +class Forbidden(PyAggError): + status_code = 403 + default_message = 'You do not have the rights to access that resource' + + +class NotFound(PyAggError): + status_code = 404 + default_message = 'Resource was not found' -- cgit