getsentry / sentry-elixir

The official Elixir SDK for Sentry (sentry.io)
https://sentry.io
MIT License
627 stars 185 forks source link

maybe_log_send_result/2 MatchError: no match of right hand side value: :too_many_retries #792

Closed danielspofford closed 2 months ago

danielspofford commented 2 months ago

Environment

What version are you running? 10.7.1

Steps to Reproduce

Ephemeral error in practice. This pattern https://github.com/getsentry/sentry-elixir/blob/10.7.1/lib/sentry/transport/sender.ex#L77 does not always match. It is possible for the right hand side to be :too_many_retries, perhaps from https://github.com/getsentry/sentry-elixir/blob/10.7.1/lib/sentry/transport.ex#L45.

Expected Result

The general approach in maybe_log_send_result/2 is to gracefully log and return, so my expectation for this error case would be the same rather than raising an exception.

Actual Result

Image

savhappy commented 2 months ago

@danielspofford Absolutely, we have an error message that should have been logged here. Working on a PR for this. Thanks for the report!

danielspofford commented 2 months ago

Awesome @savhappy, thank you!