Skip to content

Errors

Korta uses a flat error shape:

{
"statusCode": 400,
"error": "Bad Request",
"message": "Validation failed",
"requestId": "req-123",
"details": {}
}
  • requestId is optional and returned when X-Request-Id is provided.
  • details is optional.
  • Validation errors usually include field-level data in details.
StatusMeaningWhen it happens
400Bad RequestRequest validation fails (invalid schema, invalid URL, invalid params).
401UnauthorizedMissing/invalid token, invalid API key, unverified account, invalid credentials.
403ForbiddenAuthenticated user tries to modify/delete a link they do not own, or blocked CORS origin.
404Not FoundRoute not found, URL not found, user not found, invalid/expired verification token.
409ConflictEmail already in use, short ID already in use.
429Too Many RequestsEndpoint-specific limiter exceeded (per-IP window and limit).
500Internal Server ErrorUnhandled server-side failure.
503Service UnavailableTemporary dependency failure (for example, verification email provider unavailable during registration).
  • Cause: Invalid body/query/params.
  • Resolution: Validate payload against endpoint schema and retry.
  • Cause: Missing or expired JWT, invalid API key, or unverified user.
  • Resolution: Re-authenticate, verify email, regenerate API key if needed.
  • Cause: Insufficient permissions (ownership) or CORS origin not allowed.
  • Resolution: Ensure resource ownership and verify CORS_ORIGINS / FRONTEND_URL env values.
  • Cause: Wrong path or resource does not exist.
  • Resolution: Check endpoint URL, IDs, and token links.
  • Cause: Unique conflict (email or shortId).
  • Resolution: Use a different email/short ID.
  • Cause: Too many requests from the same IP in time window.
  • Resolution: Back off and retry later; respect endpoint-specific limits from Rate Limits.
  • Cause: Unexpected backend error.
  • Resolution: Check server logs and retry.
  • Cause: A required external dependency is temporarily unavailable (for example SMTP provider when sending verification email).
  • Resolution: Retry after a short delay and check provider status; no partial account is kept if registration email delivery fails.