feat: Use error domain and code for event message #750
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📜 Description
When capturing an NSError combine the error message of the error.domain and error.code.
The error.localizedDescription is still set in the context of the event as user info. Issues with the
message coming from the domain and code might not be grouped to existing issues which messages
stem from the error.localizedDescription although there origin is the same. For new issues this
is not going to have a big impact on grouping as it is based upon stack trace, exception, and
message.
PR for updating docs: getsentry/sentry-docs#2395
💡 Motivation and Context
The localizedDescription can be in any language and might be confusing for our users when they don't speak this specific language. The domain and code are way more descriptive when an error happened.
💚 How did you test it?
Unit tests and simulator.
📝 Checklist
🔮 Next steps