Skip to content

Comments

feat: Allow accessing event exception values in before_send handler#415

Merged
limbonaut merged 16 commits intomainfrom
feat/event-exception-value
Oct 21, 2025
Merged

feat: Allow accessing event exception values in before_send handler#415
limbonaut merged 16 commits intomainfrom
feat/event-exception-value

Conversation

@limbonaut
Copy link
Collaborator

@limbonaut limbonaut commented Oct 14, 2025

This PR allows accessing and changing event exception values in the before_send handler. This is important for processing error events because, in the current version, there is no way to access the error message.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 14, 2025

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against c7024f1

@limbonaut limbonaut changed the title feat: Allow accessing event exception value in before_send handler feat: Allow accessing event exception values in before_send handler Oct 14, 2025
@limbonaut limbonaut marked this pull request as ready for review October 14, 2025 11:46
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@jpnurmi
Copy link
Collaborator

jpnurmi commented Oct 20, 2025

Would it be technically possible to have exceptions exposed as dictionary variants, for example? Would it allow replacing any field, not just the exception value, at the cost of losing strong typing?

@limbonaut
Copy link
Collaborator Author

Would it be technically possible to have exceptions exposed as dictionary variants, for example? Would it allow replacing any field, not just the exception value, at the cost of losing strong typing?

@jpnurmi Technically speaking, yes. However, this would only be a good fit with Native. SDKs like Android and Cocoa have strong-typed abstractions, making implementation much more complicated. We would have to interpret the dictionary ourselves and implement translation to Exception, Stacktrace, and Frame types (stacktrace is an attribute of exception), which would require much more effort to implement. And we also lose strong typing. Additionally, if we don't have support for, let's say, some specific field in a Frame or Stacktrace, it wouldn't be clear if that is the case from the interface.

@limbonaut limbonaut merged commit ef823e5 into main Oct 21, 2025
46 checks passed
@limbonaut limbonaut deleted the feat/event-exception-value branch October 21, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow accessing and changing exception value in before_send handler

3 participants