Ignore errors with missing Sentry Transaction

Fix CODEOCEAN-FRONTEND-1D
This commit is contained in:
Sebastian Serth
2023-08-17 00:14:39 +02:00
parent 730e6f85eb
commit 08a1eb6201

View File

@ -23,7 +23,7 @@ CodeOceanEditorWebsocket = {
const cleanedPath = url.replace(/\/\d+\//, '/*/').replace(/\/[^\/]+$/, '/*');
const websocketHost = window.location.origin.replace(/^http/, 'ws');
const sentryDescription = `WebSocket ${websocketHost}${cleanedPath}`;
const span = this.sentryTransaction.startChild({op: 'websocket.client', description: sentryDescription})
const span = this.sentryTransaction?.startChild({op: 'websocket.client', description: sentryDescription})
this.websocket = new CommandSocket(this.createSocketUrl(url, span),
function (evt) {
this.resetOutputTab();