aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/exceptions.py
diff options
context:
space:
mode:
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