Skip to content

Commit

Permalink
all exceptions inherit from PyJwtError (#340)
Browse files Browse the repository at this point in the history
* all exceptions inherit from PyJwtError

* s/Jwt/JWT/

* add to init
  • Loading branch information
dradetsky authored and jpadilla committed Mar 29, 2018
1 parent 54a39ae commit ee2ab9f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions jwt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@
InvalidIssuedAtError, InvalidIssuerError, ExpiredSignature,
InvalidAudience, InvalidIssuer, MissingRequiredClaimError,
InvalidSignatureError,
PyJWTError,
)
11 changes: 9 additions & 2 deletions jwt/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
class InvalidTokenError(Exception):
class PyJWTError(Exception):
"""
Base class for all exceptions
"""
pass


class InvalidTokenError(PyJWTError):
pass


Expand Down Expand Up @@ -30,7 +37,7 @@ class ImmatureSignatureError(InvalidTokenError):
pass


class InvalidKeyError(Exception):
class InvalidKeyError(PyJWTError):
pass


Expand Down

0 comments on commit ee2ab9f

Please sign in to comment.