How to Use It
@LocalizationAwareException('exception.pong')
export class PongException extends ImATeapotException {}import { Module } from '@nestjs/common';
import { provideLocalizationAwareOptions } from '@tradinos/cms-backend-error-handling';
@Module({
providers: [
provideLocalizationAwareOptions({ // if you do not add this will fallback the default
getTranslation(host, key, exception) {
// Your Code Goes Here
},
}),
{
provide: APP_FILTER,
useClass: LocalizationAwareExcptionFilter,
},
]
})
export class AppModule {}Last updated