Prevent duplicate error handling for WebSocket events
This commit is contained in:

committed by
Sebastian Serth

parent
c5b774f752
commit
e20ee45464
@ -215,6 +215,9 @@ var CodeOceanEditor = {
|
||||
try {
|
||||
return await callback();
|
||||
} catch (error) {
|
||||
// WebSocket errors are handled in `showWebsocketError` already.
|
||||
if (error.target instanceof WebSocket) return;
|
||||
|
||||
console.error(JSON.stringify(error));
|
||||
Sentry.captureException(JSON.stringify(error), {mechanism: {handled: false}});
|
||||
}
|
||||
|
Reference in New Issue
Block a user