You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This doc implies that in beforeDeserialize we can do callback(err) to stop the deserialization and get a throwed error, just like we do it in afterDeserialize.
However, the real behavior is different. It behaves like the field/prop doesn't exist and just skips it.
actually the error handling here is intentionally graceful. The consequence of an error is just a missing datapoint in the json, not a forcefully broken process. Otherwise it would not be possible to parse the whole dataset and identify all issues in one go.
This doc implies that in
beforeDeserialize
we can docallback(err)
to stop the deserialization and get a throwed error, just like we do it inafterDeserialize
.However, the real behavior is different. It behaves like the field/prop doesn't exist and just skips it.
For example:
We would expect that it should throw an error
err
, but it doesn't.I checked the code, here it just ignores any errors from
beforeDeserialize
, is there any reason or is it a bug?The text was updated successfully, but these errors were encountered: