diff --git a/client/src/app/worker/http/http-stream.ts b/client/src/app/worker/http/http-stream.ts index cd3f5c2779..6fb743318a 100644 --- a/client/src/app/worker/http/http-stream.ts +++ b/client/src/app/worker/http/http-stream.ts @@ -146,12 +146,10 @@ export abstract class HttpStream { this._receivedDataResolver = undefined; } - if ( - data instanceof ErrorDescription || - isCommunicationError(this.parse(data)) || - isCommunicationErrorWrapper(this.parse(data)) - ) { + if (data instanceof ErrorDescription || isCommunicationError(data) || isCommunicationErrorWrapper(data)) { this.handleError(data); + } else if (isCommunicationError(this.parse(data)) || isCommunicationErrorWrapper(this.parse(data))) { + this.handleError(this.parse(data)); } else { data = this.parse(data); this.failedCounter = 0;