16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/openstax/rescue_from/controller.rb', line 16
def openstax_exception_rescued(proxy, did_notify)
@message = proxy.friendly_message
@code = proxy.status_code
@error_id = proxy.error_id
@sorry = proxy.sorry
@did_notify = did_notify
respond_to do |f|
f.html { render template: openstax_rescue_config.html_error_template_path,
layout: openstax_rescue_config.html_error_template_layout_name,
status: proxy.status }
f.json { render json: { error_id: did_notify ? proxy.error_id : nil },
status: proxy.status }
f.all { head proxy.status }
end
end
|