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
captureException or captureMessage drops off object info #1794
Comments
Hey @kishor-bhatt, you can do this using Sentry.withScope((scope) => {
scope.setExtra("response", API_responseObj);
Sentry.captureException(err);
}); |
Hey Kamil,
I will add that with setExtra. Thanks for clarifying it.
Regards,
Kishor
…On Wed 12 Dec, 2018, 3:39 PM Kamil Ogórek, ***@***.***> wrote:
Hey @kishor-bhatt <https://github.com/kishor-bhatt>, you can do this
using extra context –
https://docs.sentry.io/enriching-error-data/context/?platform=javascript
Sentry.withScope((scope) => {
scope.setExtra("response", API_responseObj);
Sentry.captureException(err);
});
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1794 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQIaZTKfeiOdvQhli3awbC6Lu6iDi9jiks5u4NXwgaJpZM4ZPDwn>
.
|
Anytime! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This may be a newbie question but I want to add logs in captureMessage and captureException with JSON.stringify(API_responseObj).
The API_responseObj is trimmed off after some text in fingerprint & logentry message obj.
If same is added by console.log than message obj is having complete info, may be as logger is console.
Can you give a way where i can add a complete response object to Sentry log in string format without looping through all it's keys, something like JSON.stringify(OBJ) to print complete object.
Thanks.
The text was updated successfully, but these errors were encountered: