Skip to content

Replace nonexistent Appsignal.apply_request call - #380

Merged
unflxw merged 1 commit into
mainfrom
fix-custom-error-apply-request
Jul 14, 2026
Merged

Replace nonexistent Appsignal.apply_request call#380
unflxw merged 1 commit into
mainfrom
fix-custom-error-apply-request

Conversation

@unflxw

@unflxw unflxw commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

The custom_error action in the Rails 8 example apps called Appsignal.apply_request(request) inside the send_error block. That helper has never existed, so the block raised NoMethodError instead of attaching the request to the reported error.

Use the real public helpers to attach the request context: set the action, and add the request's params and headers. Now /custom_error reports the error with its request context, as intended.

Found while investigating a collector-mode trace-context merge. The raising block also exposed a gap in the Ruby integration, fixed separately in appsignal/appsignal-ruby#1544 (a raising error block left the transaction unfinished). This PR only fixes the example app.

The `custom_error` action in the Rails 8 example apps called
`Appsignal.apply_request(request)` inside the `send_error` block. That
helper has never existed, so the block raised `NoMethodError` instead of
attaching the request to the reported error.

Use the real public helpers to attach the request context: set the
action, and add the request's params and headers. Now `/custom_error`
reports the error with its request context, as intended.
@backlog-helper

Copy link
Copy Markdown

Hi @unflxw,

We've found some issues with your Pull Request.

  • This Pull Request is missing labels. Please add labels to help identify types of Pull Requests. - (More info)
  • This Pull Request is missing reviewers. Either convert this Pull Request into a draft or ignore this rule by adding [skip review] to your Pull Request body. - (More info)

New issue guide | Backlog management | Rules | Feedback

@unflxw
unflxw merged commit ebcfac5 into main Jul 14, 2026
151 of 152 checks passed
@unflxw
unflxw deleted the fix-custom-error-apply-request branch July 14, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant