diff --git a/internal/api/token_oidc.go b/internal/api/token_oidc.go index a02aa2cc3e..b5767427ec 100644 --- a/internal/api/token_oidc.go +++ b/internal/api/token_oidc.go @@ -239,12 +239,11 @@ func (a *API) IdTokenGrant(ctx context.Context, w http.ResponseWriter, r *http.R return nil }); err != nil { - if err.ErrorCode == ErrorCodeUserBanned { - return forbiddenError(ErrorCodeUserBanned, "User is banned") - } switch err.(type) { case *storage.CommitWithError: return err + case *HTTPError: + return err default: return oauthError("server_error", "Internal Server Error").WithInternalError(err) }