Error Codes
All errors are returned as JSON with a code and message field.
| Code | Status | Description |
|---|---|---|
INVALID_CREDENTIALS | 401 | Wrong email or password |
USER_NOT_FOUND | 404 | User does not exist |
USER_ALREADY_EXISTS | 409 | Email already registered |
SESSION_NOT_FOUND | 401 | Session expired or missing |
INVALID_TOKEN | 400 | Invalid or expired token |
OAUTH_ERROR | 400 | OAuth flow failed |
RATE_LIMIT_EXCEEDED | 429 | Too many requests |
PASSWORD_TOO_SHORT | 400 | Password below minimum length |
ACCOUNT_NOT_LINKED | 400 | OAuth account not linked |
VALIDATION_ERROR | 400 | Request body validation failed |
INVALID_JSON | 400 | Request body is not valid JSON |
NOT_FOUND | 404 | Endpoint not found |
Example response
{
"code": "INVALID_CREDENTIALS",
"message": "Invalid email or password"
}