Skip to content

Commit e56a514

Browse files
authored
Merge pull request rails#39880 from hennevogel/bugfix/instrument-status
Fix instrumenting internal server errors
2 parents 738ca35 + 1966806 commit e56a514

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

actionpack/lib/action_controller/metal/instrumentation.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ def process_action(*)
3535
payload[:response] = response
3636
payload[:status] = response.status
3737
result
38+
rescue => error
39+
payload[:status] = ActionDispatch::ExceptionWrapper.status_code_for_exception(error.class.name)
40+
raise
3841
ensure
3942
append_info_to_payload(payload)
4043
end

0 commit comments

Comments
 (0)