fix(UX): add fallback for better error message delivery
This commit is contained in:
parent
489fea676c
commit
3d2dc25ea3
1 changed files with 4 additions and 1 deletions
|
|
@ -636,10 +636,13 @@ function upload_file(file, i) {
|
|||
: __("File upload failed.");
|
||||
} else {
|
||||
file.failed = true;
|
||||
let detail =
|
||||
xhr.statusText ||
|
||||
__("Server error during upload. The file might be corrupted.");
|
||||
file.error_message =
|
||||
xhr.status === 0
|
||||
? __("XMLHttpRequest Error")
|
||||
: `${xhr.status} : ${xhr.statusText}`;
|
||||
: `${xhr.status} : ${detail}`;
|
||||
|
||||
let error = null;
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue