8
9
10
11
12
13
14
15
16
17
|
# File 'lib/restful_error/exceptions_controller.rb', line 8
def show
@exception = request.env["action_dispatch.exception"]
code = @exception.try(:http_status) || request.path_info[1..].to_i
status = RestfulError.build_status_from_symbol_or_code(code)
@status_code = status.code
@reason_phrase = status.reason_phrase
@response_message = @exception.try(:response_message) || RestfulError.localized_phrase(@exception.class.name, status) || nil
render status: status.code, formats: request.format.symbol
end
|