shift-org / shift-org/shift-docs
Improve error handling when database isn't reachable
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 30
- Forks
- 25
- Avg merge
- 9m
- Merged PRs (30d)
- 1
Description
Had a brief outage recently where the db service had stopped; requests to the events endpoint were still returning 200, but no events were being returned. (Not sure how the add/edit/delete endpoints behaved in this scenario, I didn't test them.)
We should try to bubble up this error more effectively, and also add alerts so we are proactively notified rather than getting user reports. This case was resolved by running ./shift restart db, so we can probably emulate the same scenario locally with ./shift stop db.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the outage with ./shift stop db and exercise the events endpoint, then check how the add/edit/delete endpoints behave when the database is unavailable. Trace the existing error handling and alerting entry points; done means database failures are surfaced instead of returning an empty 200 response and proactive alerts are emitted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend, databases, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100