Skip to content

Commit

Permalink
fix(android): stringify extra if not
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Jun 22, 2020
1 parent ea0ddee commit 54918b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nssentry.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export namespace NSSentry {
if (event.extra) {
Object.keys(event.extra).forEach(k => {
const value = event.extra[k];
nEvent.setExtra(k, value);
nEvent.setExtra(k, typeof value === 'string' ? value : JSON.stringify(value));
});
}

Expand Down Expand Up @@ -301,7 +301,7 @@ export namespace NSSentry {
// io.sentry.core.Sentry.flush(0);
resolve({ status: Status.Success, id });
}).catch(err => {
console.error(err);
console.error('error sending sentry event', err, err.stack);
return Promise.reject(err);
}) as any;
}
Expand Down

0 comments on commit 54918b2

Please sign in to comment.