Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep passed exception if original_exception is nil #271

Merged
merged 1 commit into from Jul 28, 2014

Conversation

rykov
Copy link
Contributor

@rykov rykov commented Feb 4, 2014

In Rails, when ActionController::BadRequest exception is raised, the exception object responds to original_exception, but that method returns a nil value. This causes error_class and many other values for the Notice to be nil.

This change keeps the passed exception, if the exception responds to original_exception or continued_exception, but the method call returns nil

@jdelStrother
Copy link
Contributor

Yes please - I spent ages tracking this down only to find that rykov beat me to it.

@chris-baynes
Copy link

+1 this would be a helpful fix

@shifi
Copy link
Contributor

shifi commented Jul 28, 2014

@rykov awesome fix 👍
Thank you

shifi added a commit that referenced this pull request Jul 28, 2014
Keep passed exception if original_exception is nil
@shifi shifi merged commit 6401d52 into airbrake:master Jul 28, 2014
@rykov
Copy link
Contributor Author

rykov commented Jul 28, 2014

🍻

@ghost
Copy link

ghost commented Aug 20, 2014

When will it be released? Thanks!

@shifi
Copy link
Contributor

shifi commented Aug 26, 2014

@mfernandez10pines we are planning to release the new gem version next week. Thank you for your patience.

@MatiasFernandez
Copy link

Awesome!. Thanks for your effort 👍

floehopper added a commit to alphagov/asset-manager that referenced this pull request Aug 15, 2017
I changed the constraint in the `Gemfile` from `~> 4.0.0` to `~> 4.0`
and ran the following command:

    bundle update --conservative airbrake

My main motivation for doing this is so that `airbrake` reports
`ActionController::BadRequest` exceptions correctly [1]. However, I've
chosen to upgrade to the latest 4.x version, because that should include
other bug fixes without breaking compatibility with `errbit`. I'm pretty
sure this is safe to do, because I can see that a bunch of other GOV.UK
apps are using this version of `airbrake` in production, e.g.

* `calculators`
* `hmrc-manuals-api`
* `manuals-publisher`
* `publisher`
* `rummager`

Closes #122.

[1]: airbrake/airbrake#271
floehopper added a commit to alphagov/asset-manager that referenced this pull request Aug 15, 2017
I changed the constraint in the `Gemfile` from `~> 4.0.0` to `~> 4.0`
and ran the following command:

    bundle update --conservative airbrake

My main motivation for doing this is so that `airbrake` reports
`ActionController::BadRequest` exceptions correctly [1]. However, I've
chosen to upgrade to the latest 4.x version, because that should include
other bug fixes without breaking compatibility with `errbit`. I'm pretty
sure this is safe to do, because I can see that a bunch of other GOV.UK
apps are using this version of `airbrake` in production, e.g.

* `calculators`
* `hmrc-manuals-api`
* `manuals-publisher`
* `publisher`
* `rummager`

Closes #122.

[1]: airbrake/airbrake#271
floehopper added a commit to alphagov/asset-manager that referenced this pull request Aug 17, 2017
I changed the constraint in the `Gemfile` from `~> 4.0.0` to `~> 4.0`
and ran the following command:

    bundle update --conservative airbrake

My main motivation for doing this is so that `airbrake` reports
`ActionController::BadRequest` exceptions correctly [1]. However, I've
chosen to upgrade to the latest 4.x version, because that should include
other bug fixes without breaking compatibility with `errbit`. I'm pretty
sure this is safe to do, because I can see that a bunch of other GOV.UK
apps are using this version of `airbrake` in production, e.g.

* `calculators`
* `hmrc-manuals-api`
* `manuals-publisher`
* `publisher`
* `rummager`

Closes #122.

[1]: airbrake/airbrake#271
floehopper added a commit to alphagov/asset-manager that referenced this pull request Aug 17, 2017
I changed the constraint in the `Gemfile` from `~> 4.0.0` to `~> 4.0`
and ran the following command:

    bundle update --conservative airbrake

My main motivation for doing this is so that `airbrake` reports
`ActionController::BadRequest` exceptions correctly [1]. However, I've
chosen to upgrade to the latest 4.x version, because that should include
other bug fixes without breaking compatibility with `errbit`. I'm pretty
sure this is safe to do, because I can see that a bunch of other GOV.UK
apps are using this version of `airbrake` in production, e.g.

* `calculators`
* `hmrc-manuals-api`
* `manuals-publisher`
* `publisher`
* `rummager`

Closes #122.

[1]: airbrake/airbrake#271
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.

None yet

5 participants