[에러패널] 복호화 추가
This commit is contained in:
@@ -102,6 +102,8 @@ export const TAxios = (
|
||||
console.log("TAxios response", url, res);
|
||||
|
||||
const apiSysStatus = res.headers["api-sys-status"];
|
||||
const apiSysMessage = res.headers["api-sys-message"];
|
||||
|
||||
const { systemNotice, systemTermination, appStatus } =
|
||||
getState().common;
|
||||
const isInitialLoad = !appStatus.loadingComplete;
|
||||
@@ -109,19 +111,29 @@ export const TAxios = (
|
||||
if (apiSysStatus === "800" && !systemNotice) {
|
||||
dispatch(setSystemNotice());
|
||||
} else if (apiSysStatus === "900" && !systemTermination) {
|
||||
const decodedURL = decodeURIComponent(atob(apiSysMessage));
|
||||
|
||||
dispatch(setSystemTermination(isInitialLoad));
|
||||
dispatch(resetPanels());
|
||||
dispatch(
|
||||
pushPanel({
|
||||
name: Config.panel_names.ERROR_PANEL,
|
||||
panelInfo: {
|
||||
apiSysMessage: decodedURL,
|
||||
},
|
||||
})
|
||||
);
|
||||
} else if (apiSysStatus === "901" && !systemTermination) {
|
||||
const decodedURL = decodeURIComponent(atob(apiSysMessage));
|
||||
|
||||
dispatch(setSystemTermination(isInitialLoad));
|
||||
dispatch(resetPanels());
|
||||
dispatch(
|
||||
pushPanel({
|
||||
name: Config.panel_names.ERROR_PANEL,
|
||||
panelInfo: {
|
||||
apiSysMessage: decodedURL,
|
||||
},
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user