# ERROR RESPONSES

[← API Authentication](./03-api-authentication.md) | [Về API](../06-api/)

---

## Error Response Format

```json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid input data",
    "details": [
      {
        "field": "email",
        "message": "Email is required"
      }
    ],
    "timestamp": "2024-01-15T10:30:00Z"
  }
}
```

---

## Common Error Codes

- `VALIDATION_ERROR`: Input validation failed
- `NOT_FOUND`: Resource not found
- `UNAUTHORIZED`: Authentication required
- `FORBIDDEN`: Insufficient permissions
- `DUPLICATE_ENTRY`: Resource already exists
- `BUSINESS_RULE_VIOLATION`: Business rule violated
- `EXTERNAL_SERVICE_ERROR`: External API error

Chi tiết: [Error Handling](../03-backend/05-error-handling.md)

---

**Back to**: [API Endpoints](./01-api-endpoints.md)
