Skip to content

Handle database errors without crashing#7

Open
Friendiks-codex wants to merge 1 commit into
dephizee:masterfrom
Friendiks-codex:codex/db-error-handling
Open

Handle database errors without crashing#7
Friendiks-codex wants to merge 1 commit into
dephizee:masterfrom
Friendiks-codex:codex/db-error-handling

Conversation

@Friendiks-codex

Copy link
Copy Markdown

Summary

  • Adds small response helpers for JSON/text/error responses.
  • Replaces several async throw err database paths with HTTP 500 JSON errors so DB failures do not crash the Node process.
  • Handles malformed /api signup requests with a 400 instead of assuming query parameter order.
  • Adds a real npm test script and focused tests for JSON errors and DB callback handling.

Test plan

  • npm test

Closes #1.

Payout wallet if accepted: 0xdE6dd9624d46b833E2957d54010ADE5Aef5CCB33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework my old app

1 participant