Skip to content

Rollbar.error has less context than uncaught exceptions #1151

@Paul-Yves

Description

@Paul-Yves

Uncaught exceptions in Rails are reported to rollbar with stacktrace and context such as request parameters.
However if we replace :

may_raise_exception()

by

begin
  may_raise_exception()
rescue TheExceptionClass => error
  return if should_fail_silently(error) # sometimes the exception should not be raised
  Rollbar.error(error)
end

I noticed a loss of context, I no longer have request param for example. I still have the proper stacktrace though so the part of the doc I read did not really helped me and I was wondering if it was a known issue and if there was something I could do to keep the maximum amount of context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions