Browse Source

Improve rpc error handling

pull/2929/head
Igor Kulikov 6 years ago
parent
commit
dc3c65dca2
  1. 2
      ui-ngx/src/app/core/api/widget-subscription.ts

2
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;

Loading…
Cancel
Save