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

crash when error message is a symbol #1574

Closed
ThomasSevestre opened this issue Sep 17, 2021 · 1 comment · Fixed by #1577
Closed

crash when error message is a symbol #1574

ThomasSevestre opened this issue Sep 17, 2021 · 1 comment · Fixed by #1577
Assignees
Projects
Milestone

Comments

@ThomasSevestre
Copy link

When the error message is a symbol, passing the error to sentry leads to the following error :

sentry-ruby-core-4.7.2/lib/sentry/interfaces/single_exception.rb:7:in `initialize': undefined method `byteslice' for :error_message:Symbol (NoMethodError)
sentry-ruby-core-4.7.2/lib/sentry/interfaces/single_exception.rb:23:in `new'
sentry-ruby-core-4.7.2/lib/sentry/interfaces/single_exception.rb:23:in `build_with_stacktrace'
sentry-ruby-core-4.7.2/lib/sentry/interfaces/exception.rb:20:in `block in build'
sentry-ruby-core-4.7.2/lib/sentry/interfaces/exception.rb:17:in `map'
sentry-ruby-core-4.7.2/lib/sentry/interfaces/exception.rb:17:in `build'
sentry-ruby-core-4.7.2/lib/sentry/event.rb:137:in `add_exception_interface'
sentry-ruby-core-4.7.2/lib/sentry/client.rb:55:in `block in event_from_exception'
sentry-ruby-core-4.7.2/lib/sentry/client.rb:54:in `tap'
sentry-ruby-core-4.7.2/lib/sentry/client.rb:54:in `event_from_exception'
sentry-ruby-core-4.7.2/lib/sentry/hub.rb:99:in `capture_exception'
sentry-ruby-core-4.7.2/lib/sentry-ruby.rb:181:in `capture_exception'
@st0012 st0012 added this to To do in 4.x via automation Sep 20, 2021
@st0012 st0012 added this to the 4.8.0 milestone Sep 20, 2021
@st0012
Copy link
Collaborator

st0012 commented Sep 20, 2021

@ThomasSevestre Thanks for reporting this. It shouldn't return such exceptions.
However, it still won't take Symbol and you should pass String instead.

4.x automation moved this from To do to Done Sep 22, 2021
@st0012 st0012 modified the milestones: 4.8.0, 4.7.3 Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4.x
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants