Closed maquchizi closed 4 years ago
Thanks!
Thank you for merging, @revmischa. Would you mind publishing the changes to PyPI? We're using this in production and it's really handy. Also, thank you for maintaining the package.
ok try 1.14
Works like a charm. Thank you!!
Right now, the package forwards
ValueError
andJWTError
to the caller as is which causes a 500 error on the server.This PR handles those errors cleanly and returns a helpful message.
Sample tokens that would raise these errors:
Bearer asdasd
will raiseValueError: not enough values to unpack (expected 2, got 1)
Bearer aasdfasdf.asdfasdf
will raisejose.exceptions.JWTError: Error decoding token headers.