Skip to content

fix(#105): ensure consistent requestId in all error payloads#127

Open
Elite-tch wants to merge 1 commit intoSplit-Naira:mainfrom
Elite-tch:fix/105-consistent-error-request-id
Open

fix(#105): ensure consistent requestId in all error payloads#127
Elite-tch wants to merge 1 commit intoSplit-Naira:mainfrom
Elite-tch:fix/105-consistent-error-request-id

Conversation

@Elite-tch
Copy link
Copy Markdown

fix(#105): Consistent requestId in all error payloads
Closes #105

This PR:
Adds requestId to every 4xx response in POST /:projectId/distribute and GET /:projectId/history .
Updates the global errorHandler to detect RequestValidationError and return a 400 instead of masking it as a 500
Adds 18 contract tests ( splits.contract.test.ts ) that assert { error, message, requestId } is present on all error responses across every route
All 18 tests pass.

image

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 29, 2026

@Elite-tch Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@mimijuwonlo-commits
Copy link
Copy Markdown
Contributor

pls kindly resolve conflicts @Elite-tch

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.

Backend: Ensure consistent error payloads with requestId across routes

2 participants