Skip to content

fix: [TA-213] deleteSavedPhotographer에 await 누락 수정#93

Merged
seorinn merged 2 commits into
developfrom
TA-213-fix-await-deleteSavedPhotographer
May 11, 2026
Merged

fix: [TA-213] deleteSavedPhotographer에 await 누락 수정#93
seorinn merged 2 commits into
developfrom
TA-213-fix-await-deleteSavedPhotographer

Conversation

@seorinn

@seorinn seorinn commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • PhotographerInfo/index.tsxtoggleSavePhotographer에서 deleteSavedPhotographer(userInfo.id) 호출 시 await 누락 수정
  • 기존: deleteSavedPhotographer()가 Promise를 반환하지만 await 없이 호출되어 에러가 catch 블록에 전달되지 않음
  • 수정: await deleteSavedPhotographer()로 변경하여 삭제 API 에러가 정상적으로 catch에서 처리됨

Root Cause

// before (버그)
isSavedPhotographer
  ? deleteSavedPhotographer(userInfo.id)   // await 없음 → unhandled rejection
  : await savePhotographer(userInfo.id);

// after (수정)
isSavedPhotographer
  ? await deleteSavedPhotographer(userInfo.id)
  : await savePhotographer(userInfo.id);

Test plan

  • 작가를 저장한 상태로 작가 상세 페이지 진입
  • 저장 취소 버튼 클릭 시 서버 에러 발생해도 catch 블록이 실행되는지 확인
  • 정상 케이스: 저장 취소 후 count 감소 및 아이콘 변경 확인

@vercel

vercel Bot commented May 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
damaba Ready Ready Preview, Comment May 11, 2026 6:44am

@seorinn seorinn force-pushed the TA-213-fix-await-deleteSavedPhotographer branch from 9b402b3 to 30f171f Compare May 11, 2026 06:43
@seorinn seorinn marked this pull request as ready for review May 11, 2026 06:44
@seorinn seorinn merged commit 92c083a into develop May 11, 2026
2 of 3 checks passed
@seorinn seorinn deleted the TA-213-fix-await-deleteSavedPhotographer branch May 11, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant