Skip to content

crash when error message is a symbol #1574

@ThomasSevestre

Description

@ThomasSevestre

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'

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions