toonvanstrijp / nestjs-i18n

The i18n module for nestjs.
https://nestjs-i18n.com
Other
642 stars 106 forks source link

Allow I18nValidationException to use errorHttpStatusCode #518

Closed Tow96 closed 1 year ago

Tow96 commented 1 year ago

Clear and concise description of the problem

Currently when using I18nValidationPipe any given errorHttpStatusCode gets ignored, and the default 400 'Bad Request' error is sent.

Suggested solution

A fix for that is adding both the ability to receive an HttpStatus to the I18nValidationException class, as well as making the I18nErrorFactory able to pass the code from the validation pipe

Alternative

No response

Additional context

I have a fork already with how the feature can be implemented, I can also create a PR for this if needed.

Validations

rubiin commented 1 year ago

closed as completed https://github.com/toonvanstrijp/nestjs-i18n/pull/519#issuecomment-1613684079