mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-20 13:33:06 +00:00
Update toaster-error-handler.ts
This commit is contained in:
parent
2f3014fcf6
commit
3eda507229
@ -6,10 +6,12 @@ export class ToasterErrorHandler extends RavenErrorHandler {
|
||||
super.handleError(err);
|
||||
|
||||
const toasterService = this.injector.get(ToasterService);
|
||||
if (err.error.message) {
|
||||
if (err.error && err.error.message) {
|
||||
toasterService.error(err.error.message);
|
||||
} else {
|
||||
} else if (err.message) {
|
||||
toasterService.error(err.message);
|
||||
} else if (err.error) {
|
||||
toasterService.error(err.error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user