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

[PLAT-5702] Capture NSError userInfo #974

Merged
merged 1 commit into from
Jan 18, 2021
Merged

Conversation

nickdowell
Copy link
Contributor

@nickdowell nickdowell commented Jan 18, 2021

Goal

Include the NSError's userInfo in error reports.

Design

The nserror metaData now includes a userInfo value which contains a sanitised version of the NSError's userInfo property.

Since it is a dictionary, it is fully searchable in the dashboard.

Changeset

-[BugsnagClient appendNSErrorInfo:block:event:] now includes userInfo in the nserror metadata.

Added BSGJSONDictionary() function to create a JSON sanitised JSON version of userInfo.

Testing

Manually tested using example app.

Added new unit test for BSGJSONDictionary()

Updated barebones test to verify presence of nserror.userInfo

@github-actions
Copy link

github-actions bot commented Jan 18, 2021

Infer: No issues found 🎉

Bugsnag.framework binary size increased by 144 bytes from 1,058,928 to 1,059,072

Generated by 🚫 Danger

@nickdowell nickdowell force-pushed the nickdowell/nserror-userinfo branch from c52a95b to a5d2db7 Compare January 18, 2021 11:46
@nickdowell nickdowell force-pushed the nickdowell/nserror-userinfo branch from a5d2db7 to 945f144 Compare January 18, 2021 11:51
@nickdowell nickdowell changed the title Capture NSError userInfo [PLAT-5702] Capture NSError userInfo Jan 18, 2021
@nickdowell nickdowell marked this pull request as ready for review January 18, 2021 12:05
@nickdowell nickdowell merged commit 653df64 into next Jan 18, 2021
@nickdowell nickdowell deleted the nickdowell/nserror-userinfo branch January 18, 2021 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants