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

Unable to use onSendCallback or add extra payload #109

Closed
claudiozam opened this issue Apr 5, 2020 · 2 comments · Fixed by #115
Closed

Unable to use onSendCallback or add extra payload #109

claudiozam opened this issue Apr 5, 2020 · 2 comments · Fixed by #115
Assignees

Comments

@claudiozam
Copy link

Hi, I want to add a some extra payload on catched / uncatched exceptions but onSendCallback is not working.

"react-native": "^0.61.5"
"rollbar-react-native": "^0.7.2"

Thanks

@waltjones waltjones self-assigned this Apr 27, 2020
@waltjones
Copy link
Contributor

This looks like an issue in the react native code path for Rollbar.js.

Normally, when the default userCheckIgnore predicate is used, onSendCallback gets called from there:
https://github.com/rollbar/rollbar.js/blob/master/src/predicates.js#L15-L24

The React Native code path has its own userCheckIgnore that doesn't include the call to onSendCallback.
https://github.com/rollbar/rollbar.js/blob/master/src/react-native/predicates.js#L20-L34

This will need to be fixed in Rollbar.js, and then that fix pulled in to rollbar-react-native.

For updating the payload, I would have suggested the transform(payload) callback, but I just looked and it won't get called either. This will also require an update in Rollbar.js.

A rollbar-react-native release is due soon, and I'll work on getting these changes in.

@waltjones
Copy link
Contributor

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 a pull request may close this issue.

2 participants