mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[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:
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user