[AAE-5280] Better error handling for user task (#7070)

* [AAE-5280] [ADF] Better error handling for user task

* * fixed comments
This commit is contained in:
Dharan
2021-06-01 16:33:03 +05:30
committed by GitHub
parent 37efc8bcd0
commit 2637654dba
9 changed files with 79 additions and 19 deletions

View File

@@ -67,4 +67,13 @@ export class TaskDetailsCloudDemoComponent {
onFormSaved() {
this.notificationService.openSnackMessage('Task has been saved successfully');
}
onError({ message: error }: Error) {
let errorMessage;
try {
errorMessage = JSON.parse(error).message || JSON.parse(error).entry?.message;
errorMessage = JSON.parse(errorMessage).message;
} catch {}
this.notificationService.showError(errorMessage || error);
}
}