/Place/Address/Streets/{postcode} always returns internal server error

URI:

https://api.tfl.gov.uk/Place/Address/Streets/SW1A1AA

Response

{
  "$type": "Tfl.Api.Presentation.Entities.ApiError, Tfl.Api.Presentation.Entities",
  "timestampUtc": "2021-11-18T08:21:19.2435064Z",
  "name": "Internal",
  "exceptionType": "WebException",
  "httpStatusCode": 500,
  "httpStatus": "InternalServerError",
  "relativeUri": "/Place/Address/Streets/SW1A1AA",
  "message": "An internal server error occurred."
}

The swagger file confusingly also defined query params postcode and postcodeInput.postcode but including/omitting these doesn’t appear to make a difference. similarly using api_key or not doesn’t make a difference.

Notably using an incorrect postcode format in the request does return an appropriate bad request error

{
  "$type": "Tfl.Api.Presentation.Entities.ApiError, Tfl.Api.Presentation.Entities",
  "timestampUtc": "2021-11-18T08:24:22.0314828Z",
  "exceptionType": "ApiArgumentException",
  "httpStatusCode": 400,
  "httpStatus": "BadRequest",
  "relativeUri": "/Place/Address/Streets/SW1A",
  "message": "Incorrect postcode format. "
}

Any clues?

It looks like there is fault here - let’s ask @jamesevans

2 Likes