Commit dc3c65dca2dbaefd6f91f1bb7caed7efa6f6a88d

Authored by Igor Kulikov
1 parent 168a941b

Improve rpc error handling

@@ -670,6 +670,8 @@ export class WidgetSubscription implements IWidgetSubscription { @@ -670,6 +670,8 @@ export class WidgetSubscription implements IWidgetSubscription {
670 if (!this.executingRpcRequest || rejection.status === 408) { 670 if (!this.executingRpcRequest || rejection.status === 408) {
671 this.rpcRejection = rejection; 671 this.rpcRejection = rejection;
672 if (rejection.status === 408) { 672 if (rejection.status === 408) {
  673 + this.rpcErrorText = 'Request Timeout.';
  674 + } else if (rejection.status === 409) {
673 this.rpcErrorText = 'Device is offline.'; 675 this.rpcErrorText = 'Device is offline.';
674 } else { 676 } else {
675 this.rpcErrorText = 'Error : ' + rejection.status + ' - ' + rejection.statusText; 677 this.rpcErrorText = 'Error : ' + rejection.status + ' - ' + rejection.statusText;