[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

@@ -72,16 +72,10 @@ export class UnClaimTaskCloudDirective implements OnInit {
@HostListener('click')
async onClick() {
try {
await this.unclaimTask();
await this.taskListService.unclaimTask(this.appName, this.taskId).toPromise();
this.success.emit(this.taskId);
} catch (error) {
this.error.emit(error);
}
}
private async unclaimTask() {
await this.taskListService.unclaimTask(this.appName, this.taskId).subscribe(
() => {
this.success.emit(this.taskId);
});
}
}