Revize bb545c9c
Přidáno uživatelem Jakub Hlaváč před téměř 4 roky(ů)
src/app/auth/interceptors/auth.interceptor.ts | ||
---|---|---|
47 | 47 |
this.toastService.showError(err.error.message); |
48 | 48 |
return this.handleError(request, next); |
49 | 49 |
} else if ((err instanceof HttpErrorResponse && err.status === 500 || err.status === 504 || err.status === 500)) { |
50 |
this.toastService.showError('500 - Error!'); |
|
50 |
if (err.error) { |
|
51 |
this.toastService.showError(err.error); |
|
52 |
} else { |
|
53 |
this.toastService.showError('500 - Error!'); |
|
54 |
} |
|
51 | 55 |
this.handle500Error(err); |
52 | 56 |
} else { |
53 | 57 |
return throwError(err); |
src/app/sensor/components/sensor.component.ts | ||
---|---|---|
48 | 48 |
this.sensor = sensors.filter(value => value.sensorId === this.sensorId)[0]; |
49 | 49 |
this.showGraph(); // show default graph |
50 | 50 |
} |
51 |
}); |
|
51 |
}, err => this.toastService.showError(err.error.message));
|
|
52 | 52 |
} |
53 | 53 |
|
54 | 54 |
/** |
Také k dispozici: Unified diff
Re #XXXX - Error handling