brnstz / bus

Mobile web app for discovering public transit in NYC --
https://token.live
MIT License
5 stars 2 forks source link

Error handle bad cached responses #66

Closed brnstz closed 8 years ago

brnstz commented 8 years ago

Right now we are caching bytes of an HTTP response in precacher. We may not know the response is bad until we actually try to read it. For example, frequently the MTA subway time API returns blank trip IDs. We should figure out a way to reject bad responses before caching them. (Either by validating them or by caching objects rather than the bytes).