Skip to content

Commit db02321

Browse files
authored
[25.01.01 / TASK-80] Feature - 배포 준비 (#7)
* modify: env 분리 * refactor: any 타입 제거
1 parent 7663db8 commit db02321

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

.env.sample

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'.env.development (개발 환경), .env.production (배포 환경)'
2+
13
NEXT_PUBLIC_BASE_URL=<'server url here'>
24
NEXT_PUBLIC_ABORT_MS=<'abort time(ms) for fetch here'>
35
SENTRY_AUTH_TOKEN=<'sentry auth token here'>

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ yarn-error.log*
3535
*.tsbuildinfo
3636
next-env.d.ts
3737

38-
.env
38+
.env.development
39+
.env.production
3940

4041
# Sentry Config File
4142
.env.sentry-build-plugin

src/apis/instance.request.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const instance = async <I, R>(
6767
});
6868

6969
return (data.body as unknown as SuccessType<R>).data;
70-
} catch (err: any) {
70+
} catch (err: unknown) {
7171
const context = err as Response;
7272
if (
7373
location &&
@@ -87,7 +87,7 @@ export const instance = async <I, R>(
8787
} else {
8888
if (!error?.[`${(err as Response).status}`]) {
8989
const serverError = new Error(
90-
`서버에서 예기치 않은 오류가 발생했습니다. (${err.name})`,
90+
`서버에서 예기치 않은 오류가 발생했습니다. (${(err as Error).name})`,
9191
);
9292
sentry.captureException(serverError);
9393
throw serverError;

0 commit comments

Comments
 (0)