Better error message in doorkeeper json response
This commit is contained in:
parent
0a68464995
commit
0aeae195cb
1 changed files with 2 additions and 2 deletions
|
@ -30,8 +30,8 @@ class ApiController < ApplicationController
|
|||
render json: { error: 'Remote SSL certificate could not be verified' }, status: 503
|
||||
end
|
||||
|
||||
def doorkeeper_unauthorized_render_options(*)
|
||||
{ json: { error: 'Not authorized' } }
|
||||
def doorkeeper_unauthorized_render_options(error: nil)
|
||||
{ json: { error: (error.try(:description) || 'Not authorized') } }
|
||||
end
|
||||
|
||||
def doorkeeper_forbidden_render_options(*)
|
||||
|
|
Loading…
Reference in a new issue