에러 코드 네이밍 변경
This commit is contained in:
@@ -7,18 +7,7 @@ export type NiceAxiosError = AxiosError<{
|
||||
data?: any;
|
||||
status?: string;
|
||||
}>;
|
||||
export type CBDCAxiosError = AxiosError<{
|
||||
errorCode?: string;
|
||||
code?: string;
|
||||
message?: string;
|
||||
data?: any;
|
||||
status?: string;
|
||||
}>;
|
||||
|
||||
export interface CBDCAxiosFallbackProps {
|
||||
error: CBDCAxiosError;
|
||||
resetErrorBoundary?: (...args: unknown[]) => void;
|
||||
}
|
||||
export interface NiceAxiosFallbackProps {
|
||||
error: NiceAxiosError;
|
||||
resetErrorBoundary?: (...args: unknown[]) => void;
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
import { QueryKey, UseInfiniteQueryOptions, UseMutationOptions, UseQueryOptions } from '@tanstack/react-query';
|
||||
import { CBDCAxiosError } from '@/shared/@types/error';
|
||||
import { NiceAxiosError } from '@/shared/@types/error';
|
||||
|
||||
export type QueryOptions<
|
||||
TQueryFnData = unknown,
|
||||
TError = CBDCAxiosError,
|
||||
TError = NiceAxiosError,
|
||||
TData = TQueryFnData,
|
||||
TQueryKey extends QueryKey = QueryKey,
|
||||
> = Omit<UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>, 'queryKey' | 'queryFn' | 'initialData'>;
|
||||
|
||||
export type MutationOptions<TVariables = unknown, TError = CBDCAxiosError, TData = void, TContext = unknown> = Omit<
|
||||
export type MutationOptions<TVariables = unknown, TError = NiceAxiosError, TData = void, TContext = unknown> = Omit<
|
||||
UseMutationOptions<TData, TError, TVariables, TContext>,
|
||||
'mutationKey' | 'mutationFn'
|
||||
>;
|
||||
|
||||
export type InfiniteQueryOptions<
|
||||
TQueryFnData = unknown,
|
||||
TError = CBDCAxiosError,
|
||||
TError = NiceAxiosError,
|
||||
TData = TQueryFnData,
|
||||
TQueryKey extends QueryKey = QueryKey,
|
||||
TPageParam = unknown,
|
||||
|
||||
Reference in New Issue
Block a user