fixing response blob

This commit is contained in:
Warunee Tamkoo 2024-06-14 11:06:31 +07:00
parent a27091a81a
commit 74f1540203
25 changed files with 138 additions and 119 deletions

View file

@ -90,8 +90,8 @@ const fileDownload = async (type: string) => {
`รายละเอียดบันทึกเวียนแจ้งการถึงแก่กรรม-${fullName}.${type}`
);
})
.catch((e) => {
messageError($q, e);
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
})
.finally(() => {
hideLoader();

View file

@ -403,8 +403,8 @@ const fileDownload = async (type: string, fileName: string) => {
.then(async (res) => {
downloadFile(res, `${fileName}.${type}`);
})
.catch((e) => {
messageError($q, e);
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
})
.finally(() => {
hideLoader();