toonvanstrijp / nestjs-i18n

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

Throw error instead of logging to logger #557

Closed ruudvanbuul closed 10 months ago

ruudvanbuul commented 10 months ago

With the current functionality it's impossible to catch missing translations in a "pretty" way (using error instead of checking if translation is the same as key).

For me this results in a lot of errors in sentry that I would like to catch but am not able too...

https://github.com/toonvanstrijp/nestjs-i18n/blob/bee66b95d1bb631aa9e84bf5dbbb07c07060f4bc/src/services/i18n.service.ts#L117

rubiin commented 10 months ago

https://github.com/toonvanstrijp/nestjs-i18n/releases/tag/v10.3.2 published. While initializing the module, set throwOnMissingKey to true https://nestjs-i18n.com/quick-start#i18noptions

ruudvanbuul commented 10 months ago

Was gonna make a PR today but see you already applied it.

Thanks!