catch added to getattachmentsbyid call

This commit is contained in:
Eudes Inácio
2022-12-21 16:25:09 +01:00
parent b2981edf3f
commit 93bbe3f188
14 changed files with 57 additions and 24 deletions
@@ -404,8 +404,12 @@ export class EditEventToApproveComponent implements OnInit {
async getAttachments() {
let result: any = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise();
let result: any;
try {
result = await this.attachmentsService.getAttachmentsById(this.InstanceId).toPromise();
} catch (error) {
console.error('getAttachments', error)
}
result.forEach((e)=>{
e.action = false