Skip to content

Commit

Permalink
fix(core): handle file upload promise reject
Browse files Browse the repository at this point in the history
  • Loading branch information
GianfrancoFrau committed Oct 7, 2020
1 parent e9a5bef commit d9e8840
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
13 changes: 13 additions & 0 deletions interaction/app/default/src/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5537,5 +5537,18 @@
"state": "final"
}
}
},
{
"id": "STRINGS.MESSAGES.SERVER_REJECTED_UPLOAD",
"values": {
"it": {
"value": "Upload non completato: il file non è stato accettato dal server",
"state": "final"
},
"en": {
"value": "Upload error: the file has been rejected by the server",
"state": "final"
}
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,13 @@ export class VvcContactWrap {
this.zone.run(() => {
this.uiService.setUploaded();
});
});
}).catch(err => {
this.logger.error('contact.attach error', err);
this.zone.run(() => {
this.uiService.setUploaded();
this.messageService.sendSystemMessage('STRINGS.MESSAGES.SERVER_REJECTED_UPLOAD');
});
})
}
sendIsWriting() {
if (!this.autoChat && this.contact) {
Expand Down

0 comments on commit d9e8840

Please sign in to comment.