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

nil value for Rollbar::Util.deep_merge first argument #358

Closed
fabn opened this issue Dec 11, 2015 · 1 comment
Closed

nil value for Rollbar::Util.deep_merge first argument #358

fabn opened this issue Dec 11, 2015 · 1 comment

Comments

@fabn
Copy link
Contributor

fabn commented Dec 11, 2015

With release 2.7.0 I got the actual error message for the issued described in #354 that is

Failsafe from rollbar-gem. NoMethodError: "undefined method `[]' for nil:NilClass" in lib/rollbar/util.rb:70:in `block in deep_merge': build_payload in exception_data

So instead of the patch discussed here the right fix should check if hash1 is nil.

However I don't know how to handle that case because I don't know the semantic of that method.

Looking at the code a simple hash1 ||= {} before the each_key loop may fix the issue but I don't know what consequences may have on the other code, so I won't submit a PR for that.

@jondeandres
Copy link
Contributor

Thanks for this investigation @fabn. We'll try to reproduce this and fix this soon.

Your solution may work, but we will need to check exactly what is happening.

Thanks for this!

jondeandres pushed a commit that referenced this issue Dec 17, 2015
We want the default value for the arguments in
`Rollbar::Util.deep_merge` to be empty Hashes.

Fixes #358
jondeandres pushed a commit that referenced this issue Dec 18, 2015
We want the default value for the arguments in
`Rollbar::Util.deep_merge` to be empty Hashes.

Fixes #358
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

No branches or pull requests

2 participants