Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/websdk/hatta/error.py
diff options
context:
space:
mode:
Diffstat (limited to 'websdk/hatta/error.py')
-rw-r--r--websdk/hatta/error.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/websdk/hatta/error.py b/websdk/hatta/error.py
new file mode 100644
index 0000000..54edee2
--- /dev/null
+++ b/websdk/hatta/error.py
@@ -0,0 +1,40 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+import werkzeug.exceptions
+
+
+class WikiError(werkzeug.exceptions.HTTPException):
+ """Base class for all error pages."""
+
+
+class BadRequest(WikiError):
+ code = 400
+
+
+class ForbiddenErr(WikiError):
+ code = 403
+
+
+class NotFoundErr(WikiError):
+ code = 404
+
+
+class RequestEntityTooLarge(WikiError):
+ code = 413
+
+
+class RequestURITooLarge(WikiError):
+ code = 414
+
+
+class UnsupportedMediaTypeErr(WikiError):
+ code = 415
+
+
+class NotImplementedErr(WikiError):
+ code = 501
+
+
+class ServiceUnavailableErr(WikiError):
+ code = 503