web: show proper error on attachment upload failure

This commit is contained in:
Abdullah Atta
2023-01-03 09:51:02 +05:00
parent 19a5e78495
commit 5971253728

View File

@@ -574,7 +574,7 @@ function parseS3Error(data) {
if (!(data instanceof ArrayBuffer)) {
return {
Code: "UNKNOWN",
Message: "An unknown error occured while uploading the attachment."
Message: typeof data === "object" ? JSON.stringify(data) : data
};
}
const xml = new TextDecoder().decode(data);