Resources
Every public error code in one table.
Branch on code
43 codes
| HTTP | Code | Retry | Meaning and fix |
|---|---|---|---|
| 400 | INVALID_INPUT | No | Generic schema or input validation failure. Fix: Read error.message, correct the value it names and send the request again. On a seat enquiry it can also mean the train does not serve that journey: check that it stops at both stations. |
| 400 | VALIDATION_ERROR | No | A request field is missing or invalid. The message names it, and error.details[].field names the parameter (date, items[2].date, match, callback_url). Fix: Correct each field that error.details[].field names (for example date or items[2].date) and send the request again. It is not counted. |
| 400 | INVALID_STATION_CODE | No | Station code format or reference validation failed. Fix: Send a station code of 1 to 6 letters or digits, such as NDLS, or J for Jalna. Look a code up with GET /stations/search. |
| 400 | INVALID_TRAIN_NUMBER | No | Train number format validation failed. Fix: Send the train number as 4 to 6 digits or capital letters, such as 12951. Find a number with GET /trains/search. |
| 400 | INVALID_DATE | No | Date format or allowed window validation failed. Fix: Send the date as YYYY-MM-DD in India time (IST), inside the window the endpoint's page gives. |
| 400 | INVALID_QUOTA | No | Unknown quota code. Fix: Use a quota code the endpoint's page lists, such as GN or TQ. |
| 400 | INVALID_CLASS_CODE | No | Unknown class code. Fix: Use a class code the endpoint's page lists, such as SL, 3A or 2A. |
| 401 | MISSING_API_KEY | No | No key in X-RailCore-Key, Authorization: Bearer or X-Api-Key, or the key is too short. Fix: Send your key in X-RailCore-Key (or Authorization: Bearer, or X-Api-Key). Keys are at least 20 characters long; create one under API keys in the developer dashboard. |
| 401 | AMBIGUOUS_API_KEY | No | More than one key header was sent, with different keys. Send the key in one header. Fix: Send the key in one header only, or make every key header carry the same key. |
| 401 | INVALID_API_KEY | No | The credential is unknown or revoked. Fix: Check the key for a typo or a missing part. If it was revoked or rotated, use the current key from the developer dashboard. |
| 401 | API_KEY_DISABLED | No | The credential was disabled by policy or an operator. Fix: Use another active key from the developer dashboard, or contact support to find out why this one was disabled. |
| 401 | API_KEY_EXPIRED | No | Credential expiry has passed. Fix: Create or rotate a key in the developer dashboard and update your configuration with the new one. |
| 401 | SIGNATURE_INVALID | No | HMAC signature missing or not verified. Growth, Scale and Enterprise keys must sign every request; a key with no signing secret must be rotated. Fix: Rebuild the signature: method, path with /v1, the canonical query (sorted by key then value), the SHA-256 hex of the exact body bytes sent, the timestamp and the nonce, one per line; HMAC-SHA256 with your signing secret, base64. A key with no signing secret must be rotated to get one. |
| 401 | TIMESTAMP_EXPIRED | No | Signed timestamp is outside the five-minute window. Fix: Send the current Unix time in seconds in X-RailCore-Timestamp and keep your server clock in sync (NTP). It must be within five minutes of RailCore's clock. |
| 401 | NONCE_REUSED | No | The signed nonce already appeared in the replay window. Fix: Generate a new random nonce of 16 to 128 characters for every request, retries included. |
| 401 | PLAYGROUND_TOKEN_EXPIRED | No | A docs playground token has expired or is not valid. They last 15 minutes; the playground gets a new one by itself. Fix: Get a new playground token: the docs console does this by itself, or sign in again. Tokens last 15 minutes. |
| 403 | IP_NOT_ALLOWED | No | Caller IP is not in the key allowlist. Fix: Send requests from an address on the key's IP allowlist, or add this address to the allowlist in the developer dashboard. |
| 403 | SCOPE_MISSING | No | The key lacks the operation scope. Fix: Use a key whose scopes include the scope on this endpoint's page, or create a key with that scope. |
| 403 | PLAN_INACTIVE | No | The subscription is paused, past due, or cancelled. Fix: Renew, resume or reactivate the subscription in the developer dashboard's billing section. Requests work again as soon as it is active. |
| 403 | PLAN_ENDPOINT_DISABLED | No | The current plan does not include the endpoint. Fix: Move to a plan that includes this endpoint (see railcore.tech/pricing), or use an endpoint your plan includes. |
| 402 | CREDITS_EXHAUSTED | No | The month's requests are used up, or too few are left for this request. Nothing is fetched. Fix: Wait for your monthly requests to renew, or upgrade your plan. Check X-RailCore-Credits-Remaining before large requests such as seat batches. |
| 429 | RATE_LIMITED | Yes | The account's per-minute budget, or a Free account's daily budget, is used up. Every key on the account shares it. Honor Retry-After. Fix: Wait for the seconds in Retry-After, then retry with jitter. Limits belong to the account and are shared by all of its keys: spread requests out, or move to a plan with a higher limit. |
| 429 | JOB_LIMIT_EXCEEDED | Yes | Five async jobs are already active on the account, across all of its keys. Fix: Wait for an active job to finish, or cancel one with DELETE /jobs/{job_id}, then submit again. An account can run five jobs at once. |
| 404 | TRAIN_NOT_FOUND | No | No train has that number, on any /trains/{train_number}/ path but /live. The message names it: Train 99999 not found. Check the train number. Fix: Check the train number. Find the right one by name or number with GET /trains/search. |
| 404 | STATION_NOT_FOUND | No | A station code or name could not be resolved. The message names it: Station ZZZZ not found. Check the station code. Fix: Check the station code. Find it by name with GET /stations/search. |
| 404 | COACH_POSITION_NOT_FOUND | No | On /trains/{train_number}/coach-position: the train exists, but no source RailCore reads publishes its coach composition. The message names it: No coach composition is published for train 12345. Not counted. Fix: No source publishes this train's coach composition. Retrying soon will not help; try again on another day. |
| 404 | NO_TRAINS_FOUND | No | No train matches the route and date. Fix: Try another date, nearby stations, or match=city to include every station in both cities. |
| 404 | NOT_FOUND | No | Nothing matches the request: a train with no run on the date asked for on live train status, no fare for a fare estimate, or a path the API does not have. Fix: Nothing matches the request. Check the identifiers and the date (a train may not run that day), then ask again. |
| 404 | JOB_NOT_FOUND | No | The async job does not exist or expired. Fix: Check the job ID. Jobs and their results expire, so submit the job again if it is gone. |
| 409 | CHART_NOT_PREPARED | Yes | The chart is not ready yet. Fix: Ask again later: the chart is prepared a few hours before the train leaves. |
| 422 | TATKAL_NOT_OPEN | No | Tatkal booking has not opened for the journey yet. error.opens_at (IST) says when, if known. Not counted. Fix: Ask again after the time in error.opens_at (IST). Tatkal opens the day before the train leaves its origin, at 10:00 for AC classes and 11:00 for the rest. |
| 422 | QUOTA_NOT_AVAILABLE | No | The train does not offer that quota in that class for the journey. Not counted. Fix: Choose another quota or class: the train does not offer this quota in this class. |
| 422 | QUOTA_NOT_SUPPORTED | No | Seat availability is not offered for that quota on any train: it answers GN, TQ, SS and LD only. Premium Tatkal (PT), HP, DP, HO, YU and FT can be checked on IRCTC. RailCore refuses it before the seat provider is asked. Not counted. Fix: Use GN, TQ, SS or LD. Other quotas, Premium Tatkal included, cannot be checked through RailCore; check them on IRCTC. |
| 422 | CLASS_NOT_AVAILABLE | No | The train does not carry that class. error.message lists the classes it does. Not counted. Fix: Choose one of the classes the message lists for this train. |
| 422 | TRAIN_NOT_RUNNING | No | The train does not leave the boarding station on that date. error.message lists the days it does. Not counted. Fix: Choose one of the days the message lists, or check the boarding station. |
| 422 | BOOKING_NOT_OPEN | No | The date has not opened for booking: reservations open 60 days before the journey, at 8:00 AM in India. RailCore refuses it before the seat provider is asked. error.message names the day it opens. Not counted. Fix: Choose a date inside the booking window: reservations open 60 days before the journey, at 08:00 IST. |
| 409 | JOB_ALREADY_FINISHED | No | The job is already terminal and cannot be cancelled. Fix: There is nothing to cancel. Read the job's result with GET /jobs/{job_id} instead. |
| 410 | API_VERSION_SUNSET | No | The requested API major has reached its announced sunset date. Migrate to a supported version. Fix: Move to a supported API version. The changelog names the current one. |
| 410 | ENDPOINT_RETIRED | No | The endpoint no longer answers API keys. The Link header and error.details name the endpoint to use instead. Fix: Use the endpoint the Link header and error.details name. For live train status that is GET /trains/{train_number}/live. |
| 503 | UPSTREAM_UNAVAILABLE | Yes | Every live-data route for the request failed. Sent with Retry-After; not counted. Fix: Wait for the seconds in Retry-After, then retry with exponential backoff and jitter (about 500 ms, 1 s, 2 s, 4 s) and stop after five attempts. The request is not counted. |
| 503 | UPSTREAM_TIMEOUT | Yes | The live-data source ran past its deadline. Sent with Retry-After; not counted. Fix: Wait for the seconds in Retry-After, then retry with exponential backoff and jitter (about 500 ms, 1 s, 2 s, 4 s) and stop after five attempts. The request is not counted. |
| 500 | INTERNAL | Yes | Unexpected server error. Fix: Retry with backoff. If it keeps happening, contact support with the X-RailCore-Request-ID. |
| 503 | METERING_UNAVAILABLE | Yes | The request could not be counted, so the data was withheld. Fix: Retry with backoff. The request was not counted and no data was sent. |
Last updated