You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All error handler callbacks should include the original error message in the parameters.
E.g, the _expired_token_callback takes e.jwt_header, e.jwt_data as parameters, thus the original error message is lost when setting the expired_token_loader.
Either the entire error should be set as parameter, I.e. _expired_token_callback(e: Exception) or alternatively you could add the error message as a string _expired_token_callback(e.jwt_header, e.jwt_data, str(e)).
The same applies for all error handlers which do not include the error message.
The text was updated successfully, but these errors were encountered:
If you don't mind me asking, what is the use case you are trying to accomplish by having access to those strings? My first thought is that if those strings are passed into the callbacks, people might try to do some kind of conditional logic based on those strings, which means it would be hard for them to be changed in the future which I don't love.
My first thought was to add the original error to the response message, but some of the errors may be too descriptive so I might not do that. Alternatively I would log the error message for troubleshooting. Without the original error you are kind of blind to what the issue is.
All error handler callbacks should include the original error message in the parameters.
E.g, the
_expired_token_callback
takese.jwt_header, e.jwt_data
as parameters, thus the original error message is lost when setting theexpired_token_loader
.Either the entire error should be set as parameter, I.e.
_expired_token_callback(e: Exception)
or alternatively you could add the error message as a string_expired_token_callback(e.jwt_header, e.jwt_data, str(e))
.The same applies for all error handlers which do not include the error message.
The text was updated successfully, but these errors were encountered: