Catch all errors from jose_jwt:verify and log debugging details (#3890)

This commit is contained in:
Badlop 2022-09-01 13:00:56 +02:00
parent 808def7d32
commit aaf391b284
1 changed files with 4 additions and 1 deletions

View File

@ -146,6 +146,9 @@ check_jwt_token(User, Server, Token) ->
{false, _, _} ->
false
catch
error:{badarg, _} ->
A:B ->
?DEBUG("jose_jwt:verify failed ~n for account ~p@~p~n "
" JWK and token: ~p~n with error: ~p",
[User, Server, {JWK, Token}, {A, B}]),
false
end.