adunkman / dc311rn.com

Quickly check the status of a DC 311 service request
https://www.dc311rn.com
MIT License
6 stars 0 forks source link

Stability improvements in tests, handling DC311’s API outages. #30

Closed adunkman closed 6 years ago

adunkman commented 6 years ago

Today DC’s 311 service started resetting connections instead of responding to requests, and our service just rendered Internal Server Error pages. This is understandable (and as designed) — but let’s do better.

This PR introduces an error page to handle when we cannot reach DC311’s API.

Additionally, this PR adjusts the way we extend Error due to https://github.com/babel/babel/issues/3083 (the instanceof operator wasn’t working correctly before).

Additionally, this PR adjusts the tests for DC311.getServiceRequests() to not be dependent on today’s date, which enables the generated fixture files to fully handle the tests, preventing any network requests when running npm test.