fixing response error message for response type blob

This commit is contained in:
Warunee Tamkoo 2024-06-14 10:59:54 +07:00
parent 6375b446d2
commit a27091a81a
6 changed files with 157 additions and 139 deletions

View file

@ -336,8 +336,8 @@ const downloadScore = async () => {
// start download
a.click();
})
.catch((e) => {
messageError($q, e);
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
})
.finally(() => {
hideLoader();
@ -358,8 +358,8 @@ const downloadCertificate = async () => {
// start download
a.click();
})
.catch((e) => {
messageError($q, e);
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
})
.finally(() => {
hideLoader();