developmentseed / developmentseed/scoreboard

silent failure mode when osm-teams api is down

Open
#532 1 comment 0 reactions 0 assignees View on GitHub
bug Teams Integration
Dominant language
JavaScript
Stars
27
Forks
8
PR merge metrics
No merged PRs in 30d

Description

If osm-teams api is down, the app behaves badly when it tries to connect.

Teams page appearance when rendered server-side

Screen Shot 2020-03-25 at 8 16 37 AM

Teams page appearance when rendered client-side. It's kind of beside the point but these should not render differently (relates to #511)

Screen Shot 2020-03-25 at 8 20 27 AM

Partial stack trace from next.js

```
error: Error: connect ECONNREFUSED 127.0.0.1:8989
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1134:16) {
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 8989
},
options: {
uri: 'http://localhost:8989/api/teams?osmId=10499924',
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false
},
```
Recommendation:

Display a toast or error dialog saying osm-teams could not be reached. This would enable at the minimum an admin to troubleshoot it (or communicate it to the devs).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.