Summary
Each route builds its error responses independently, which is how error shapes drift apart between endpoints. A shared helper keeps them consistent as routes are added.
Acceptance criteria
Getting started
Fork this repository, clone your fork, and add this repo as upstream:
git clone https://github.com/<your-username>/tricklepay-backend.git
cd tricklepay-backend
git remote add upstream https://github.com/TricklePay/tricklepay-backend.git
Create a branch for this issue:
git checkout -b refactor/issue-160
Suggested commit message:
refactor: consolidate route error handling
Run npm run typecheck, npm test, and npm run build before opening a pull request and linking this issue.
Summary
Each route builds its error responses independently, which is how error shapes drift apart between endpoints. A shared helper keeps them consistent as routes are added.
Acceptance criteria
Getting started
Fork this repository, clone your fork, and add this repo as
upstream:Create a branch for this issue:
Suggested commit message:
Run
npm run typecheck,npm test, andnpm run buildbefore opening a pull request and linking this issue.