From dc3c65dca2dbaefd6f91f1bb7caed7efa6f6a88d Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Mon, 8 Jun 2020 10:29:42 +0300 Subject: [PATCH] Improve rpc error handling --- ui-ngx/src/app/core/api/widget-subscription.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui-ngx/src/app/core/api/widget-subscription.ts b/ui-ngx/src/app/core/api/widget-subscription.ts index 3cefb2cda9..bc90c626cf 100644 --- a/ui-ngx/src/app/core/api/widget-subscription.ts +++ b/ui-ngx/src/app/core/api/widget-subscription.ts @@ -670,6 +670,8 @@ export class WidgetSubscription implements IWidgetSubscription { if (!this.executingRpcRequest || rejection.status === 408) { this.rpcRejection = rejection; if (rejection.status === 408) { + this.rpcErrorText = 'Request Timeout.'; + } else if (rejection.status === 409) { this.rpcErrorText = 'Device is offline.'; } else { this.rpcErrorText = 'Error : ' + rejection.status + ' - ' + rejection.statusText;