shift-org / shift-org/shift-docs

Improve error handling when database isn't reachable

Open
#490 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

API backend database
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.