aboutsummaryrefslogtreecommitdiffstats
path: root/pygithub3/exceptions.py
blob: 9ee2597d99ec5a1b0ec5f497946a9acdd93fbc6f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python
# -*- encoding: utf-8 -*-


class InvalidBodySchema(Exception):
    """ Raised when the 'valids_body' attribute of Resource isn't in a
    valid form (required.issubsetof(schema))"""
    pass


class RequestDoesNotExist(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

    Caught with a pygithub3-exception to `services.base.Service._bool` method
    """
    pass