Skip to content

Commit fcaeab0

Browse files
Merge pull request #14 from pusher/use-pusher-base-exception
Use pusher base exception
2 parents ffbdcde + 64bdefb commit fcaeab0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pusher_push_notifications/__init__.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@
1212
MAX_NUMBER_OF_INTERESTS = 100
1313

1414

15-
class PusherValidationError(ValueError):
15+
class PusherError(Exception):
16+
"""Base class for all Pusher push notifications errors"""
17+
18+
19+
class PusherValidationError(PusherError, ValueError):
1620
"""Error thrown when the Push Notifications publish body is invalid"""
17-
pass
1821

1922

20-
class PusherAuthError(ValueError):
23+
class PusherAuthError(PusherError, ValueError):
2124
"""Error thrown when the Push Notifications secret key is incorrect"""
22-
pass
2325

2426

25-
class PusherMissingInstanceError(KeyError):
27+
class PusherMissingInstanceError(PusherError, KeyError):
2628
"""Error thrown when the instance id used does not exist"""
27-
pass
2829

2930

30-
class PusherServerError(Exception):
31+
class PusherServerError(PusherError, Exception):
3132
"""Error thrown when the Push Notifications service has an internal server
3233
error
3334
"""
34-
pass
3535

3636

3737
def handle_http_error(response_body, status_code):

0 commit comments

Comments
 (0)