7주차 미션 [도토]#23
Open
yewon20804 wants to merge 16 commits into
Open
Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Open
3 tasks
ywkim1m
approved these changes
May 19, 2026
Collaborator
ywkim1m
left a comment
There was a problem hiding this comment.
다른 서비스 레이어에도 같은 방식으로 커스텀 에러 추가해주시면 좋겠습니다!
| const store = await getStoreById(data.storeId); | ||
| if (!store) { | ||
| throw new Error("존재하지 않는 가게입니다."); | ||
| } |
Collaborator
There was a problem hiding this comment.
예외 처리 방식에 맞춰 StoreNotFoundError 같은 커스텀 에러를 사용하면 errorCode, statusCode, data까지 일관되게 관리할 수 있습니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Week7 미션
작업 내용
1. TSOA 도입 및 라우트 자동화
tsoa설치tsoa.json설정 파일 추가tsconfig.json에experimentalDecorators,emitDecoratorMetadata추가index.ts: 수동 라우트 등록 →RegisterRoutes(router)+app.use("/api/v1", router)구조로 변경2. 공통 응답 형식 통일
{ resultType: "SUCCESS", error: null, data: T }{ resultType: "FAILED", error: { errorCode, message, data }, data: null }3. 커스텀 에러 처리
AppError클래스 추가index.ts에 전역 에러 핸들러 미들웨어 등록userSignUp서비스에DuplicateUserEmailError적용4. 미들웨어 추가
morgan— HTTP 요청 로깅cookie-parser— 쿠키 파싱