Skip to main content

Error handling

The TfL API uses conventional HTTP status codes. Codes in the 2xx range indicate success, 4xx indicate a client error, and 5xx indicate a server error.

For the three playground GET operations, see response codes in tfl-playground.json.

HTTP status codes

CodeMeaning
200Success
400Bad request. Check your parameters.
401Unauthorized. Invalid or missing credentials (secured environments).
404Resource not found.
429Rate limited. Reduce request frequency.
500Server error. Retry later.

Authentication errors

This demo uses public, unauthenticated GET requests only. A 401 response would mean the upstream service changed policy for your request path; it isn't expected for the three playground operations documented on this site.

Rate limiting

If you receive 429, slow down and cache results where possible. See Authentication.