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:
Justin Edmund 2025-02-10 18:16:56 -08:00
parent 85402cc778
commit a208ea6bb7

View file

@ -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