Update api_controller.rb
Change render_unprocessable_entity_response to render the errors hash instead of the exception so that we get more helpful errors.
This commit is contained in:
parent
85402cc778
commit
a208ea6bb7
1 changed files with 1 additions and 1 deletions
|
|
@ -86,7 +86,7 @@ module Api
|
|||
end
|
||||
|
||||
def render_unprocessable_entity_response(exception)
|
||||
render json: ErrorBlueprint.render_as_json(nil, exception: exception),
|
||||
render json: ErrorBlueprint.render_as_json(nil, errors: exception.to_hash),
|
||||
status: :unprocessable_entity
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue