diff --git a/.env.sample b/.env.sample index efb1b1c..b652ace 100644 --- a/.env.sample +++ b/.env.sample @@ -1,3 +1,5 @@ +'.env.development (개발 환경), .env.production (배포 환경)' + NEXT_PUBLIC_BASE_URL=<'server url here'> NEXT_PUBLIC_ABORT_MS=<'abort time(ms) for fetch here'> SENTRY_AUTH_TOKEN=<'sentry auth token here'> diff --git a/.gitignore b/.gitignore index 8e82084..97f3878 100644 --- a/.gitignore +++ b/.gitignore @@ -35,7 +35,8 @@ yarn-error.log* *.tsbuildinfo next-env.d.ts -.env +.env.development +.env.production # Sentry Config File .env.sentry-build-plugin diff --git a/src/apis/instance.request.ts b/src/apis/instance.request.ts index c3b3774..4932cb5 100644 --- a/src/apis/instance.request.ts +++ b/src/apis/instance.request.ts @@ -67,7 +67,7 @@ export const instance = async ( }); return (data.body as unknown as SuccessType).data; - } catch (err: any) { + } catch (err: unknown) { const context = err as Response; if ( location && @@ -87,7 +87,7 @@ export const instance = async ( } else { if (!error?.[`${(err as Response).status}`]) { const serverError = new Error( - `서버에서 예기치 않은 오류가 발생했습니다. (${err.name})`, + `서버에서 예기치 않은 오류가 발생했습니다. (${(err as Error).name})`, ); sentry.captureException(serverError); throw serverError;