error-handling
일관된 에러 처리와 로깅 패턴을 구현합니다. API 에러 응답, 예외 처리, 에러 바운더리, 사용자 친화적 메시지 작성 시 사용하세요. 서버와 클라이언트 양쪽의 에러 처리 전략을 포함합니다.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
일관된 에러 처리와 로깅 패턴을 구현합니다. API 에러 응답, 예외 처리, 에러 바운더리, 사용자 친화적 메시지 작성 시 사용하세요. 서버와 클라이언트 양쪽의 에러 처리 전략을 포함합니다.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Creates custom React hooks for SideDish. Use when the user asks to create a new hook, extract shared logic into a hook, or refactor component logic into reusable hooks. Includes TypeScript interfaces, memoization patterns, and index.ts export.
API 아키텍처 설계 원칙과 패턴을 적용합니다. RESTful API 설계, 버저닝, 응답 표준화, 미들웨어 패턴 구현 시 사용하세요. Next.js App Router 기반 서버리스 아키텍처에 최적화되어 있습니다.
Creates Next.js API routes with Firebase. Use when adding GET/POST/PATCH/DELETE endpoints, implementing pagination, adding auth checks, or handling file uploads. Includes route templates and error handling.
Creates React components for SideDish. Use when adding new UI components, modals, forms, or interactive elements. Includes TypeScript interfaces, styling patterns, and security considerations.
Firestore 데이터 모델링과 스키마 설계 패턴을 적용합니다. 새 컬렉션 추가, 관계 설계, 인덱스 최적화, 데이터 마이그레이션 시 사용하세요. NoSQL 특성에 맞는 비정규화 전략을 포함합니다.
Debugs common issues in SideDish. Use when fixing errors, investigating bugs, troubleshooting API failures, or resolving build issues. Includes common error patterns, logging strategies, and debugging tools.
| name | error-handling |
| description | 일관된 에러 처리와 로깅 패턴을 구현합니다. API 에러 응답, 예외 처리, 에러 바운더리, 사용자 친화적 메시지 작성 시 사용하세요. 서버와 클라이언트 양쪽의 에러 처리 전략을 포함합니다. |
| allowed-tools | Read, Glob, Grep |
ApiError class on client-side| Code | Use Case | Message |
|---|---|---|
| 400 | Invalid input | 입력 정보를 확인해주세요. |
| 401 | Auth required | 인증이 필요합니다. |
| 403 | No permission | 권한이 없습니다. |
| 404 | Not found | 찾을 수 없습니다. |
| 429 | Rate limit | 요청이 너무 많습니다. |
| 500 | Server error | 서버 오류가 발생했습니다. |
try {
// logic
} catch (error) {
console.error('[API] POST /api/endpoint error:', error)
return NextResponse.json({ error: '서버 오류가 발생했습니다.' }, { status: 500 })
}
For complete patterns (client error handling, toast helpers, retry logic, error messages), see reference.md.