From b63bb95db0d96ee6ddf1f2b32209546e7e9b3363 Mon Sep 17 00:00:00 2001 From: six-standard Date: Wed, 1 Jan 2025 18:30:22 +0900 Subject: [PATCH 1/2] =?UTF-8?q?modify:=20env=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.sample | 2 ++ .gitignore | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) 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 From b758f033e34a825956ce86442fd33638a3e6bd52 Mon Sep 17 00:00:00 2001 From: six-standard Date: Wed, 1 Jan 2025 18:30:33 +0900 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20any=20=ED=83=80=EC=9E=85=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/instance.request.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;