Every error response from the Asterwise API conforms to a stable
8-field envelope. This reference page lists every error code we
may return, organized by category.
Each error page documents:
- What the error means in plain English
- When you'll see it
- A code example showing how to handle it in production
- How to avoid the error in the first place
All 401, 403, 404, 422, 429, and 5xx responses follow the same
shape. OAuth endpoints (/v1/oauth/*) are the one exception —
they return RFC 6749-compliant {error, error_description} per
the OAuth standard.
Authentication
Authorization
| Code | HTTP | Message |
|---|
email_not_verified | 403 | Confirm your email first. We've sent a confirmation link to your account's address; it expires in 24 hours. |
ownership_denied | 403 | You do not have permission to access this resource. |
session_required | 403 | This endpoint is for the signed-in dashboard; API keys can't use it. API keys call the calculation endpoints and GET /v1/keys/me. |
Validation
| Code | HTTP | Message |
|---|
geocode_query_too_short | 422 | Search query must be at least 2 characters. |
invalid_email | 422 | Please provide a valid email address. |
invalid_request_body | 422 | Request body is missing or malformed. |
location_required | 422 | A location is required for this calculation. Provide either a location name, or latitude, longitude, and timezone. |
payload_too_large | 413 | Request body exceeds maximum allowed size of 64KB. |
plan_not_found | 422 | The specified plan does not exist. |
solar_day_out_of_range | 422 | The instant falls outside the solar day (sunrise to next sunrise), or the computed day/night span is invalid. Use an instant within that interval, or verify location and date. |
sun_calculation_failed | 422 | Sunrise or sunset could not be computed for this date and location, usually because the Sun does not rise or set there that day (polar day or night). Verify latitude, longitude, and timezone, or use another date. |
validation_error | 422 | The request couldn't be processed. See the 'details' field for specific field-level issues. |
Not Found
| Code | HTTP | Message |
|---|
account_not_found | 404 | No account was found matching the provided credentials. Sign up at asterwise.com or verify your sign-in details. |
city_not_found | 404 | No locations found matching your query. |
key_not_found | 404 | API key not found or you do not have permission to access it. |
resource_not_found | 404 | The requested resource was not found at this endpoint. Verify the URL path and resource identifier. |
subscription_not_found | 404 | No active plan found. |
Rate Limiting
Billing
Infrastructure
| Code | HTTP | Message |
|---|
email_delivery_failed | 503 | We are having trouble sending email right now. Please try again in a few minutes. |
ephemeris_unavailable | 503 | Ephemeris calculations are temporarily unavailable. Please try again in a few minutes, or contact [email protected] if the problem persists. |
geocode_unavailable | 503 | Location search is temporarily unavailable. Please try again shortly. |
internal_error | 500 | Something went wrong on our end. Please try again, or contact [email protected] if the problem persists. Include your request_id when contacting support. |