Capture non-JSON error in newSentryTransaction
Using the JSON representation of the error only works for some errors, whereas others are simply marked with a {}. Still, we attach the JSON representation to the Sentry event captured.
This commit is contained in:

committed by
Dominic Sauer

parent
1d07028242
commit
db966eeb9d
@ -215,8 +215,8 @@ var CodeOceanEditor = {
|
|||||||
// WebSocket errors are handled in `showWebsocketError` already.
|
// WebSocket errors are handled in `showWebsocketError` already.
|
||||||
if (error.target instanceof WebSocket) return;
|
if (error.target instanceof WebSocket) return;
|
||||||
|
|
||||||
console.error(JSON.stringify(error));
|
console.error(error);
|
||||||
Sentry.captureException(JSON.stringify(error), {mechanism: {handled: false}});
|
Sentry.captureException(error, {mechanism: {handled: false, data: {error_json: JSON.stringify(error)}}});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user