Skip to content

When our GitHub endpoints return a non-JSON result, show a nice error page. #272

@noway

Description

@noway

Is your feature request related to a problem? Please describe.
I'm always frustrated when we have an outage, and we're not showing a nice error on the frontend.

Describe the solution you'd like
When outage happens, our GitHub endpoints (healhpointLocations.json, uniqLocations.json, availability/*.json) show an empty resonse. This fails the Fetch library during parsing (const data = await res.json) and we end up spitting out "Unexpected token < in JSON at position 0" error. We should make a nicer error for this case.

Additional context
Can test this by pointing the endpoints to https://google.com or a website which doesn't return JSON.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions