rollbar-gem icon indicating copy to clipboard operation
rollbar-gem copied to clipboard

scope does not like false

Open blowfishpro opened this issue 3 years ago • 0 comments

Steps to reproduce:

Try to add some scope with a false value:

Rollbar.scoped(example: false) { Rollbar.error(Exception.new) }

Observed:

  • the example key does not appear on the exception
  • If you use any other truthy value (including true, numbers, or anthing else other than nil) it sends correctely

Desired:

  • false and true are treated the same way. Maybe nil is different?

Notes:

  • The behavior comes from this line - that condition is falsy with false or nil so nothing is done
  • Maybe the behavior of false and nil should be thought about here? To me false should be merged in like a normal value and nil indicates that we want to remove that value in the merged hash. But maybe others feel differently?

blowfishpro avatar Jul 14 '22 23:07 blowfishpro