module JSONAPIErrors::Rails::Controller

Public Instance Methods

render_error(exception) click to toggle source

TODO set option to only and except for when using rescue_from

# File lib/jsonapi_errors/rails/controller.rb, line 12
def render_error(exception)
  response_h = HashRenderer.new(exception).render
  render json: response_h, status: response_h[:status].to_i
end