diff --git a/src/packages/LiveClient.ts b/src/packages/LiveClient.ts index ebc1e861..2522e4f1 100644 --- a/src/packages/LiveClient.ts +++ b/src/packages/LiveClient.ts @@ -35,17 +35,6 @@ export class LiveClient extends AbstractWsClient { }; this._socket.onclose = (event: any) => { - /** - * changing the event.target to any to access the private _req - * property that isn't available on the WebSocket.CloseEvent type - **/ - const newTarget: any = event.target; - - if (newTarget["_req"]) { - const dgErrorIndex = newTarget["_req"].res.rawHeaders.indexOf("dg-error"); - event.reason = newTarget["_req"].res.rawHeaders[dgErrorIndex + 1]; - } - this.emit(LiveTranscriptionEvents.Close, event); };