diff --git a/deps/rabbitmq_auth_backend_oauth2/src/rabbit_auth_backend_oauth2.erl b/deps/rabbitmq_auth_backend_oauth2/src/rabbit_auth_backend_oauth2.erl index 7f3782edc85..849349f0478 100644 --- a/deps/rabbitmq_auth_backend_oauth2/src/rabbit_auth_backend_oauth2.erl +++ b/deps/rabbitmq_auth_backend_oauth2/src/rabbit_auth_backend_oauth2.erl @@ -121,10 +121,7 @@ update_state(AuthUser, NewToken) -> impl = fun() -> DecodedToken end}}; {error, mismatch_username_after_token_refresh} -> {refused, - "Not allowed to change username on refreshed token"}; - {error, Error} -> - {refused, - rabbit_misc:format("Failed to refresh token due to ~p", [Error])} + "Not allowed to change username on refreshed token"} end end end.