diff options
Diffstat (limited to 'webapp/src/app/services/xdsagent.service.ts')
-rw-r--r-- | webapp/src/app/services/xdsagent.service.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/webapp/src/app/services/xdsagent.service.ts b/webapp/src/app/services/xdsagent.service.ts index 23880ff..55653c7 100644 --- a/webapp/src/app/services/xdsagent.service.ts +++ b/webapp/src/app/services/xdsagent.service.ts @@ -323,7 +323,7 @@ export class XDSAgentService { .subscribe( res => { }, error => { - this.alert.error('ERROR while registering to all events: ', error); + this.alert.error('ERROR while registering to all events: ' + error); } ); } @@ -366,7 +366,7 @@ export class XDSAgentService { private _decodeError(err: any) { let e: string; if (err instanceof HttpErrorResponse) { - e = err.error || err.message || 'Unknown error'; + e = (err.error && err.error.error) ? err.error.error : err.message || 'Unknown error'; } else if (typeof err === 'object') { if (err.statusText) { e = err.statusText; @@ -378,6 +378,7 @@ export class XDSAgentService { } else { e = err.message ? err.message : err.toString(); } + console.log('xdsagent.service - ERROR: ', e); return Observable.throw(e); } } |