에러 코드
표준 HTTP status + 의미.
공통
| Status | 의미 | 일반적인 원인 |
|---|---|---|
| 400 | Bad Request | 필수 파라미터 누락, 형식 오류 |
| 401 | Unauthorized | 토큰 누락·만료·서명 검증 실패 |
| 403 | Forbidden | 권한 부족, IDOR 차단 |
| 404 | Not Found | 리소스 없음 |
| 409 | Conflict | 중복 (e.g. order_id 재사용) |
| 422 | Unprocessable Entity | 유효성 검증 실패 |
| 429 | Too Many Requests | Rate limit 초과 → Retry-After: 60 헤더 확인 |
| 500 | Internal Server Error | 서버 오류 (재시도 권장) |
CP-Auth 특수 에러
error 코드 | 의미 |
|---|---|
invalid_grant | code 만료/재사용/redirect_uri 불일치 |
invalid_client | client_id 또는 client_secret 오류 |
unsupported_grant_type | grant_type 값이 비표준 |
pkce_required | code_challenge 누락 |
pkce_verifier_mismatch | code_verifier 가 challenge와 일치하지 않음 |
응답 예시:
{
"error": "invalid_grant",
"error_description": "Authorization code is expired or already used"
}Rate Limit 응답
HTTP/1.1 429 Too Many Requests
Retry-After: 60
Content-Type: application/json
{"detail": "Rate limit exceeded"}