← Errors and troubleshooting

Troubleshooting

Polar latitude errors: Placidus, KP cusps and muhurta

Inside the polar circles some degrees of the zodiac never rise and some days have no sunrise. Anything defined on those events is undefined there - not hard to compute, undefined. The API says so with a 400 and a reason, and everything that can be computed still is.

Updated · every example recorded from a real API call

Status
400 VALIDATION_ERROR with a reason (500 before 26 Nov 2026).
Affected
Placidus and Koch houses, KP charts and cusps, sunrise-based muhurta.
Unaffected
Vedic birth charts, divisional charts, panchang, porphyry / equal / whole-sign houses.
Retry?
Not with the same input - fall back to a system that is defined there.

What works and what does not in Tromsø

Tromsø, Norway (69.65°N), at noon on 21 December 1990 - polar night - sent to each endpoint:

Tromsø, 1990-12-21 12:00 (+60)
EndpointResult
/v1/charts/birth200 - ascendant Aquarius 13°51′
/v1/panchang200
/v1/western/natal/houses, porphyry200 - ascendant Pisces 7°35′
/v1/western/natal/houses, placidus or koch400
/v1/kp/chart, /v1/kp/house-cusps400
/v1/muhurta/choghadiya, /v1/muhurta/hora400

The three messages

Western houses with house_system: "placidus" (Koch reads the same):

json
{
  "request_id": "req_01M8RK47W1NJPECAS01AX5NE1R",
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Placidus house cusps are undefined at latitude 69.65° for this moment (inside the polar circle, some degrees of the ecliptic never rise). Use a house_system that is defined everywhere: porphyry, equal or whole-sign."
  }
}

KP chart or cusps - KP has no alternative house system to offer:

json
{
  "request_id": "req_01M8RK47W3T3WBPDZ5XRF2KTQ1",
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Placidus house cusps are undefined at latitude 69.65° for this moment (inside the polar circle, some degrees of the ecliptic never rise). KP charts and the compatibility strong-lagna check are defined on Placidus cusps, so they cannot be computed for this birth."
  }
}

Choghadiya or hora on a day without sunrise:

json
{
  "request_id": "req_01M8RK47W44QY0XQY3YK4X9TNA",
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "No sunrise at latitude 69.65° on 1990-12-21 (midnight sun or polar night). Muhurta windows are divisions of the sunrise-to-sunset day, so they are undefined for this date and place."
  }
}

It depends on the date, not just the place

Muhurta fails on both solstices in Tromsø - 21 June (midnight sun) as well as 21 December - and succeeds on 21 March, when choghadiya returns its normal day and night windows. Placidus fails only for moments when the relevant degrees never rise. So a high-latitude app can work for months and then fail for the same user: test both solstices before you ship.

Handling it

  • Western houses: catch the 400 and retry with porphyry, equal or whole-sign - the message names them. Tell the user which system you fell back to.
  • KP: there is no fallback inside KP; show that KP cusps are undefined for this birth. Vedic charts for the same birth still work.
  • Muhurta: show "no muhurta windows - no sunrise on this date" rather than an error. Panchang still returns for the date.
  • Match on error.code === "VALIDATION_ERROR" plus your latitude, not on the message text, which may be reworded.

Before 26 November 2026 these requests returned 500 INTERNAL_ERROR, and Vedic charts failed above the polar circle too. If you added a workaround for that, the Vedic part can go. Background: house systems.