Implement the open $85 bounty for Lilly-Protocol/lily-backend#127 by adding regression coverage for production error-message redaction.
- Kept the change test-only; the existing production behavior was not modified.
- Set
NODE_ENVexplicitly for each scenario so the tests do not depend on ambient environment state. - Covered generic errors outside production, generic errors in production, and
AppErrormessages in production. - Did not include credentials, tokens, payment details, or private maintainer information.
- Added
tests/error-redaction.test.ts. - Used a minimal Express app with a throwing stub route and the real
errorHandler. - Asserted that non-production generic errors expose their message for development diagnostics.
- Asserted that production generic errors return
Internal server error. - Asserted that production
AppErrormessages and status codes remain available.
npm cicompleted; it reported 9 existing dependency audit findings (2 low, 1 moderate, 6 high).npm test -- --run tests/error-redaction.test.tspassed: 1 file, 3 tests.npm testpassed: 3 files, 9 tests.npm run lintpassed.npm run buildpassed.git diff --checkpassed.
- Issue #127 was claimed without posting any payout identifier.
- PR #168 was opened from branch
production-error-redaction-127; the current head is recorded in the root preflight record. - PR #168 is currently open and mergeable; no maintainer review or status checks are reported yet.
- Maintainer review, merge, bounty approval, and payment remain external gates.
- Branch:
production-error-redaction-127 - Test:
tests/error-redaction.test.ts - Summary:
ERROR_REDACTION_127_SUMMARY.md - Verify:
npm test && npm run lint && npm run build && git diff --check