Context
Donation service and validation tests exist, but the route/controller layer has several public endpoints with authentication, admin checks, query validation, and not-found behavior. Controller errors currently collapse most failures into INTERNAL_ERROR, including database-not-ready paths, so clients do not have a fully tested response contract.
Scope
Out of Scope
- Changing donation schema fields
- Adding new donation endpoints
- External payment or chain confirmation logic
Acceptance Criteria
Suggested Files or Packages
src/components/v1/Donation/
src/__tests__/
src/utils/apiResponse.ts
src/appMiddlewares/jwtAuth.api.ts
Context
Donation service and validation tests exist, but the route/controller layer has several public endpoints with authentication, admin checks, query validation, and not-found behavior. Controller errors currently collapse most failures into
INTERNAL_ERROR, including database-not-ready paths, so clients do not have a fully tested response contract.Scope
policyMiddlewareOut of Scope
Acceptance Criteria
bun run type-checkpassesbun run testpassesbun run lintpassesSuggested Files or Packages
src/components/v1/Donation/src/__tests__/src/utils/apiResponse.tssrc/appMiddlewares/jwtAuth.api.ts