catch
This commit is contained in:
@@ -140,6 +140,11 @@ export const AlimtalkListPage = () => {
|
||||
&& rs.nextCursor !== pageParam.cursor
|
||||
&& rs.content.length === DEFAULT_PAGE_PARAM.size
|
||||
);
|
||||
}).catch((e: any) => {
|
||||
if(e.response?.data?.error?.message){
|
||||
showAlert(e.response?.data?.error?.message);
|
||||
return;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -168,6 +173,11 @@ export const AlimtalkListPage = () => {
|
||||
};
|
||||
extensionAlimtalkDownloadExcel(params).then((rs: ExtensionAlimtalkDownloadExcelResponse) => {
|
||||
console.log('Excel Download Status:', rs.status);
|
||||
}).catch((e: any) => {
|
||||
if(e.response?.data?.error?.message){
|
||||
showAlert(e.response?.data?.error?.message);
|
||||
return;
|
||||
}
|
||||
});
|
||||
};
|
||||
setEmailBottomSheetOn(false);
|
||||
|
||||
@@ -110,23 +110,23 @@ const callSettingSave = () => {
|
||||
virtureAccountRefundFlag: userVirtureAccountRefundFlag
|
||||
},
|
||||
};
|
||||
alimtalkSettingSave(params)
|
||||
.then((rs) => {
|
||||
if (rs.status) {
|
||||
snackBar(t('additionalService.alimtalk.saveSuccess'));
|
||||
} else {
|
||||
snackBar(`[${t('common.failed')}] ${rs.error?.message}`)
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
const failReason = e?.response?.data?.message || e?.message || t('additionalService.alimtalk.unknownError');
|
||||
console.log(e)
|
||||
if (e.response?.data?.error?.root !== "SystemErrorCode") {
|
||||
snackBar(`[${t('common.failed')}] ${failReason}`);
|
||||
} else {
|
||||
showAlert(`[${t('common.failed')}] ${failReason}`)
|
||||
}
|
||||
});
|
||||
alimtalkSettingSave(params).then((rs) => {
|
||||
if(rs.status){
|
||||
snackBar(t('additionalService.alimtalk.saveSuccess'));
|
||||
}
|
||||
else{
|
||||
snackBar(`[${t('common.failed')}] ${rs.error?.message}`)
|
||||
}
|
||||
}).catch((e) => {
|
||||
const failReason = e?.response?.data?.message || e?.message || t('additionalService.alimtalk.unknownError');
|
||||
console.log(e)
|
||||
if (e.response?.data?.error?.root !== "SystemErrorCode") {
|
||||
snackBar(`[${t('common.failed')}] ${failReason}`);
|
||||
}
|
||||
else{
|
||||
showAlert(`[${t('common.failed')}] ${failReason}`)
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
useSetHeaderTitle(t('additionalService.alimtalk.title'));
|
||||
|
||||
Reference in New Issue
Block a user