Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -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'>
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts

.env
.env.development
.env.production

# Sentry Config File
.env.sentry-build-plugin
4 changes: 2 additions & 2 deletions src/apis/instance.request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const instance = async <I, R>(
});

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