Skip to content

Does not work with other exception filters #702

@thatsgolden

Description

@thatsgolden

Describe the bug

When I register I18nValidationExceptionFilter and my custom CatchEverythingFilter via APP_FILTER, I18nValidationExceptionFilter doesn't translate the message, it just throws the translate keys.

Image

but if I register it via app.useGlobalFilter, it will cover my custom filter, which means my custom filter doesn't work, but I18nValidationExceptionFilter works fine this time.

Image

Reproduction

thatsgolden/dto-validation

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (22) x64 Intel(R) Core(TM) Ultra 7 155H
    Memory: 5.33 GB / 31.61 GB
  Binaries:
    Node: 22.14.0 - D:\Users\thats\Documents\Volta\tools\image\node\22.14.0\node.EXE
    Yarn: 4.6.0 - D:\Users\thats\Documents\Volta\tools\image\yarn\4.6.0\bin\yarn.CMD
    npm: 10.9.2 - D:\Users\thats\Documents\Volta\tools\image\node\22.14.0\npm.CMD
    pnpm: 10.2.0 - D:\Users\thats\Documents\Volta\tools\image\pnpm\10.2.0\bin\pnpm.CMD
    bun: 1.1.0 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (131.0.2903.112)
    Internet Explorer: 11.0.26100.1882

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions