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

@ -344,8 +344,8 @@ const downloadExam = async () => {
// start download
a.click();
})
.catch((e) => {
messageError($q, e);
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
})
.finally(() => {
hideLoader();
@ -365,8 +365,8 @@ const downloadPassExam = async () => {
// start download
a.click();
})
.catch((e) => {
messageError($q, e);
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
})
.finally(() => {
hideLoader();
@ -386,8 +386,8 @@ const downloadPassResultExam = async () => {
// start download
a.click();
})
.catch((e) => {
messageError($q, e);
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
})
.finally(() => {
hideLoader();