Skip to main content

Error reference

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​

CodeHTTPMessage
api_key_invalid401Invalid API key format.
api_key_missing401API key is missing. Include it in the Authorization header as 'Bearer YOUR_KEY'.
api_key_not_found401The provided API key was not found. Verify the key in your Asterwise dashboard.
api_key_revoked401This API key has been revoked.
authentication_failed401We couldn't authenticate your request. Verify your credentials and try again.
session_expired401Your session has expired. Please sign in again.
session_not_found401Session not found. Please sign in again.
session_revoked401This session has been revoked. Please sign in again.

Authorization​

CodeHTTPMessage
email_not_verified403Confirm your email first. We've sent a confirmation link to your account's address; it expires in 24 hours.
ownership_denied403You do not have permission to access this resource.
session_required403This 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​

CodeHTTPMessage
geocode_query_too_short422Search query must be at least 2 characters.
invalid_email422Please provide a valid email address.
invalid_request_body422Request body is missing or malformed.
location_required422A location is required for this calculation. Provide either a location name, or latitude, longitude, and timezone.
payload_too_large413Request body exceeds maximum allowed size of 64KB.
plan_not_found422The specified plan does not exist.
solar_day_out_of_range422The 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_failed422Sunrise 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_error422The request couldn't be processed. See the 'details' field for specific field-level issues.

Not Found​

CodeHTTPMessage
account_not_found404No account was found matching the provided credentials. Sign up at asterwise.com or verify your sign-in details.
city_not_found404No locations found matching your query.
key_not_found404API key not found or you do not have permission to access it.
resource_not_found404The requested resource was not found at this endpoint. Verify the URL path and resource identifier.
subscription_not_found404No active plan found.

Rate Limiting​

CodeHTTPMessage
account_action_limit_exceeded429This account action was asked for too often. Wait for the time in retry_after, then try again.
burst_limit_exceeded429Too many requests per minute. Please slow down.
ip_rate_limit_exceeded429Too many requests from this IP address. Please slow down.
login_attempts_exceeded429Too many failed sign-in attempts. Try again in 15 minutes, or reset your password.
monthly_usage_limit_exceeded429Monthly API call limit reached. Upgrade your plan to continue.

Billing​

CodeHTTPMessage
already_on_plan400You are already on this plan.
max_keys_exceeded409You have reached your plan's limit of active API keys. Revoke a key or upgrade to add more.
order_creation_failed400Failed to create payment order. Please try again.
payment_provider_unavailable503Payment provider is temporarily unavailable. Please try again shortly.
payment_request_invalid400Payment provider rejected the request as invalid.
payment_verification_failed400Payment signature verification failed.
subscription_expired402Your subscription has expired. Please renew at asterwise.com/dashboard to continue.

Infrastructure​

CodeHTTPMessage
email_delivery_failed503We are having trouble sending email right now. Please try again in a few minutes.
ephemeris_unavailable503Ephemeris calculations are temporarily unavailable. Please try again in a few minutes, or contact [email protected] if the problem persists.
geocode_unavailable503Location search is temporarily unavailable. Please try again shortly.
internal_error500Something went wrong on our end. Please try again, or contact [email protected] if the problem persists. Include your request_id when contacting support.