danielthepope / trntxt

:steam_locomotive::train::train: A data-friendly UK train times site
https://trntxt.uk
MIT License
36 stars 9 forks source link

Invalid station names show 'internal server error' rather than a friendly message #30

Closed danielthepope closed 9 years ago

danielthepope commented 9 years ago

Something happened during the implementation of #23 to break the error message. Compare http://trntxt.uk/invalidstation with http://legacy.trntxt.uk/invalidstation. Some front end tests might be handy here.

danielthepope commented 9 years ago

Solution: Make sure didYouMean variable actually exists before accessing it here https://github.com/danielthepope/trntxt/blob/master/resources/template.jade#L41-L59

danielthepope commented 9 years ago

Actually it wasn't caused by the didYouMean variable at all...