fix: use NestJS HTTP exceptions in vouching service#84
Open
Doiae9 wants to merge 1 commit into
Open
Conversation
EmeditWeb
reviewed
Jul 21, 2026
Member
There was a problem hiding this comment.
Review verdict: ✅ APPROVE with minor corrections
Correct intent and matches the code standard (surface NestJS HTTP exceptions instead of bare throw new Error(...), which would otherwise all collapse to generic 500s). The InternalServerErrorException swaps in vendors/vouching are right.
Minor corrections before merge:
- Indentation is broken in the new
vouching.service.tsblock (theif (error) { ... } if (!data) { ... }section is mis-indented vs the surrounding 4-space code).npm run lint(eslint --fix) should catch it — please run it. - Non-English comments:
// Es un fallo del sistema/BDand// Es un fallo por datos inválidos del cliente— please translate to English (or remove) to match the rest of the codebase. - Mis-classified exception: the
!datacase throwsBadRequestException('Invalid vouch request data provided.'). A successful insert that returns no row is a server-side condition, not client bad input — this should beInternalServerErrorException(500), otherwise clients get a misleading 400. - Trailing whitespace on the new import line.
- Resolve conflicts at src/modules/vouching/vouching.service.ts
Small stuff — approve once cleaned up.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #68
new Error(...)instances with appropriate NestJS HTTP exceptions (InternalServerErrorException,BadRequestException,NotFoundException) invouching.service.ts.vendors.service.tsat line 63.