API errors and troubleshooting
What each error code means, when the API returns it and how to fix it - with response bodies recorded from real calls, not written by hand. Below them, the results that are correct but surprising: charts that differ from other software, ascendants and dasha dates that moved.
Every error
The error envelope
Every error uses the same shape: a request_id (also sent as the x-request-id header) and an error object with a stable code, a human-readable message and, for some codes, a details object. Switch on error.code, never on message, which may be reworded. The chat API adds "success": false.
{
"request_id": "req_01M8RK47SXCYHEM071P6DYDRYC",
"error": {
"code": "NOT_FOUND",
"message": "Route POST /v1/chart/birth not found"
}
}The success envelope and every field in both shapes: response envelope reference.
By code
Error codes
- 400 · VALIDATION_ERRORVALIDATION_ERROR: the request was rejected before any calculationWhat a 400 VALIDATION_ERROR from the AstroNode API means, how to read its details array, the five ways it is produced, and the one 400 that uses a different code.
- 401 · UNAUTHORIZEDUNAUTHORIZED: the API could not identify your keyThe three messages behind a 401 from AstroNode - no Bearer header, an invalid or revoked key, a suspended account - and how to tell which one you hit.
- 403 · PLAN_REQUIREDPLAN_REQUIRED: this endpoint needs a higher planWhy AstroNode answers 403 PLAN_REQUIRED, how the details object names the tier you need, how your effective plan is worked out, and why FORBIDDEN never appears.
- 429 · QUOTA_EXCEEDEDQUOTA_EXCEEDED: your account has used this month's requestsAstroNode's 429 QUOTA_EXCEEDED: the monthly quota is per account across all keys, resets on the 1st (UTC), bills only successful calls, and says when to retry - plus the chat API's daily cap.
- 429 · RATE_LIMITEDRATE_LIMITED: too many requests in the last 60 secondsHow AstroNode's per-key sliding-window rate limit works, which fields and headers tell you how long to wait, and a backoff loop that does not waste quota.
- 404 · NOT_FOUNDNOT_FOUND: no such route, or no such report for this keyAstroNode returns 404 NOT_FOUND for a mistyped path, a wrong HTTP method or a missing /v1 prefix, and for report ids that do not exist or belong to another key.
- 409 · IDEMPOTENCY_KEY_REUSEDIDEMPOTENCY_KEY_REUSED: same key, different requestHow the Idempotency-Key header works on AstroNode POST endpoints, why reusing a key with a changed body returns 409, and what a replayed response looks like.
- 500 · INTERNAL_ERRORINTERNAL_ERROR: something failed on our sideWhat a 500 INTERNAL_ERROR from AstroNode contains (and deliberately does not), when to retry it, and what to send support so we can find the request.
Correct, but surprising
Troubleshooting results
- Why the API's chart differs from another astrology appPlanets a sign apart, houses one off, nodes a degree out: the four convention differences behind almost every 'wrong chart' report, with real API numbers.
- Why your ascendant is off by a sign (or three)The ascendant moves about a sign every two hours, so input mistakes show up there first. Five real mistakes, the ascendant each one produced, and how to tell them apart.
- Why your dasha dates are shifted by days, months or a lordTen minutes of birth time moves every Vimshottari date by about two weeks. Real API output showing how time, offset and year length shift dasha periods - and how to tell which.
- Polar latitude errors: Placidus, KP cusps and muhurtaAbove the Arctic Circle some house systems and every sunrise-based muhurta are undefined on some dates. Which AstroNode endpoints return a 400 there, the exact messages, and the fallbacks.
For completeness
Codes you will not receive
The API's list of error codes includes a few that no request made with an API key returns today. If you have seen one of these, it came from somewhere other than the public API.
FORBIDDEN- Defined, but not returned to API-key callers. A 403 from AstroNode is PLAN_REQUIRED.ENGINE_TIMEOUT- Defined, never returned.SERVICE_UNAVAILABLE- Defined, never returned.GET /v1/healthreports dependency status with its own 503 body.INVALID_DOB, INVALID_TIME, INVALID_COORDINATES- Not returned by the REST API: bad dates, times and coordinates are VALIDATION_ERROR.