-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
I have my doorkeeper config set to api_only mode.
I have this code which I thought would raise an error when a grant is trying to be created with an invalid request (e.g. missing client ID, redirect URI, etc)
class OAuthAuthorizationsController < Doorkeeper::AuthorizationsController
def create
auth = authorize_response
render json: auth.body
rescue e
render json: {
error: e,
error_description: e.description,
},
status: :bad_request
end
end
However even though I have handle_auth_errors :raise set in the config file, authorize_response is not raising an error but just returning it (the variable auth is an error object).
Looking at the config file I understand that only these errors will be raised
# Doorkeeper::Errors::TokenForbidden, Doorkeeper::Errors::TokenExpired,
# Doorkeeper::Errors::TokenRevoked, Doorkeeper::Errors::TokenUnknown
is there a way to get errors raised in the AuthorizationsController?
Metadata
Metadata
Assignees
Labels
No labels