API 参考

Errors & Rate Limits

The JSON error envelope, error codes, and the rate-limit headers every response returns.

最后更新:

Error Handling

All error responses follow a consistent format with an error code and human-readable message:

{
  "error": {
    "code": "ERROR_CODE",
    "message": "Description of what went wrong"
  }
}

Error Codes

HTTP StatusCodeDescription
400VALIDATION_ERRORInvalid or missing request parameters
401UNAUTHORIZEDMissing or invalid API key
402PAYMENT_REQUIREDInsufficient credits
403FORBIDDENAPI access requires an active Hero plan, or action not permitted
403LIMIT_EXCEEDEDPlan limits reached (projects, builds, API keys, etc.)
404NOT_FOUNDResource not found or not accessible
409CONFLICTResource conflict (deployment in progress, subdomain taken, etc.)
429RATE_LIMITEDToo many requests — check rate limit headers
500INTERNAL_ERRORServer error — please retry or contact support

Rate Limit Headers

Every response includes these headers:

  • X-RateLimit-Remaining — Number of requests remaining in the current window
  • X-RateLimit-Reset — Seconds until the rate limit window resets

When you receive a 429 response, wait for the number of seconds indicated by X-RateLimit-Reset before retrying.

Troubleshooting

  • 401 Unauthorized — Check that your API key starts with flp_ and is included as a Bearer token. See Authentication.
  • 403 Forbidden — Verify your account has an active Hero subscription.
  • 409 Conflict on deploy — Wait for the current deployment to complete, or cancel it first. See Deployment API.
  • Subdomain errors — Subdomains must be lowercase, 3-63 characters, and contain only letters, numbers, and hyphens.