Update toaster-error-handler.ts

This commit is contained in:
piotrpekala7 2020-05-14 16:13:17 +02:00
parent 2f3014fcf6
commit 3eda507229

View File

@ -6,10 +6,12 @@ export class ToasterErrorHandler extends RavenErrorHandler {
super.handleError(err); super.handleError(err);
const toasterService = this.injector.get(ToasterService); const toasterService = this.injector.get(ToasterService);
if (err.error.message) { if (err.error && err.error.message) {
toasterService.error(err.error.message); toasterService.error(err.error.message);
} else { } else if (err.message) {
toasterService.error(err.message); toasterService.error(err.message);
} else if (err.error) {
toasterService.error(err.error);
} }
} }
} }