aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/exceptions.py
diff options
context:
space:
mode:
authorDavid Medina <davidmedina9@gmail.com>2012-02-06 21:39:59 +0100
committerDavid Medina <davidmedina9@gmail.com>2012-02-07 19:22:59 +0100
commit86453d2fb40e21280aeeee7e5ee11229bcb5eaac (patch)
tree2490c76fbbdef9bc14e5c1c2b83b632b1401eb2e /pygithub3/exceptions.py
parentSomething confusing about PUT request (diff)
downloadpython-github3-86453d2fb40e21280aeeee7e5ee11229bcb5eaac.tar.xz
python-github3-86453d2fb40e21280aeeee7e5ee11229bcb5eaac.zip
Clean requests interface
Refactorize on build request to support specific requests cleaner *Also support to verbose on requests library
Diffstat (limited to 'pygithub3/exceptions.py')
-rw-r--r--pygithub3/exceptions.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/pygithub3/exceptions.py b/pygithub3/exceptions.py
new file mode 100644
index 0000000..65881bb
--- /dev/null
+++ b/pygithub3/exceptions.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+# -*- encoding: utf-8 -*-
+
+
+class DoesNotExists(Exception):
+ """ Raised when `Request` factory can't find the subclass """
+ pass
+
+
+class UriInvalid(Exception):
+ """ Raised when `Request` factory's maker isn't in a valid form """
+ pass
+
+
+class ValidationError(Exception):
+ """ Raised when a `Request` doesn't have the necessary args to make a
+ valid URI """
+ pass
+
+
+class BadRequest(Exception):
+ """ Raised when server response is 400 """
+ pass
+
+
+class UnprocessableEntity(Exception):
+ """ Raised when server response is 400 """
+ pass
+
+
+class NotFound(Exception):
+ """ Raised when server response is 404
+
+ Catched with a pygithub3-exception to `services.base.Base._bool` method
+ """
+ pass