fix: plainToInstance
with discriminated type union with no matching subTypes
silently returns DTO
#1762
Labels
status: needs triage
Issues which needs to be reproduced to be verified report.
type: fix
Issues describing a broken feature.
Description
Minimal code-snippet showcasing the problem
Repro sandbox: https://codesandbox.io/p/sandbox/class-transformer-x3mbz
Expected behavior
I expect
plainToInstance
to throw an error if the discriminator property had a value that didn't match any subtypeActual behavior
It silently returns the original DTO
The text was updated successfully, but these errors were encountered: