From a1dba18d33a808adb7dee36cba03c3a5b5811fed Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 19 Apr 2014 22:56:17 +0200 Subject: [PATCH] Add new NotSupported exception. --- taiga/base/exceptions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/taiga/base/exceptions.py b/taiga/base/exceptions.py index a993ea76..290c87cd 100644 --- a/taiga/base/exceptions.py +++ b/taiga/base/exceptions.py @@ -29,6 +29,11 @@ class NotFound(BaseException): default_detail = _('Not found.') +class NotSupported(BaseException): + status_code = status.HTTP_405_METHOD_NOT_ALLOWED + default_detail = _("Method not supported for this endpoint.") + + class BadRequest(BaseException): """ Exception used on bad arguments detected