forked from orcasgit/python-fitbit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexceptions.py
More file actions
43 lines (28 loc) · 730 Bytes
/
exceptions.py
File metadata and controls
43 lines (28 loc) · 730 Bytes
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
43
class BadResponse(Exception):
"""
Currently used if the response can't be json encoded, despite a .json extension
"""
pass
class DeleteError(Exception):
"""
Used when a delete request did not return a 204
"""
pass
class HTTPException(Exception):
def __init__(self, response, *args, **kwargs):
super(HTTPException, self).__init__(*args, **kwargs)
class HTTPBadRequest(HTTPException):
pass
class HTTPUnauthorized(HTTPException):
pass
class HTTPForbidden(HTTPException):
pass
class HTTPServerError(HTTPException):
pass
class HTTPConflict(HTTPException):
"""
Used by Fitbit as rate limiter
"""
pass
class HTTPNotFound(HTTPException):
pass