Skip to content

[SECURITY] Add error handling to all API routes #136

@ramong26

Description

@ramong26

문제점

대부분의 API 라우트에 에러 처리가 없거나 불충분함:

  • src/app/api/profile/route.ts
  • src/app/api/comments/route.ts
  • src/app/api/auth/*/route.ts

개선 사항

  • 모든 API 라우트에 try-catch 추가
  • JWT 에러 구체적으로 처리 (만료 vs 유효하지 않음)
  • 환경변수 누락 체크 (JWT_SECRET, SPOTIFY_CLIENT_ID 등)
  • 일관된 에러 응답 형식 사용

참고

관련 PR: #134

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions