Status Codes
Nucleus uses standard HTTP status codes with a JSON body.
| Code | Meaning | Body |
|---|---|---|
| 200 | Success | {"status":"ok", ...} |
| 400 | Bad request โ missing/invalid param | {"status":"error","message":"..."} |
| 404 | Not found (e.g. invalid PNR, unknown PIN) | {"status":"not_found","message":"..."} |
| 500 | Server error | {"status":"error","message":"..."} |
| 502 | Upstream provider error | {"status":"error","message":"..."} |
| 503 | Database unavailable | {"status":"error","message":"db down"} |
Error Formatโ
All errors follow the same shape:
{
"status": "error",
"message": "Human-readable explanation"
}
For most APIs an extra api field tells you which service failed:
{
"status": "error",
"api": "weather",
"message": "Unknown city. Available: kolkata, mumbai, delhi..."
}