에러 코드 네이밍 변경

This commit is contained in:
focp212@naver.com
2025-10-25 22:05:43 +09:00
parent db0418177c
commit 7e5f1e71a7
137 changed files with 408 additions and 419 deletions

View File

@@ -1,12 +1,12 @@
import { AxiosPromise } from 'axios';
import { CBDCAxiosError } from '@/shared/@types/error';
import { NiceAxiosError } from '@/shared/@types/error';
export const resultify = async <T = any>(promiseObj: AxiosPromise<T>): Promise<T> => {
try {
const result: any = await promiseObj;
return result?.data !== undefined && result?.data !== null ? result.data : result;
} catch (error: any) {
const axiosError = error as CBDCAxiosError;
const axiosError = error as NiceAxiosError;
console.error(
`${
axiosError.response?.status ? `[${axiosError.response.status}], ` : ''