We use the Newtonsoft Json converter to deserialise API requests. As we don't want to receive data/members which are not part of the request class in the BackEnd, we set SerializerSettings.MissingMemberHandling
to MissingMemberHandling.Error
:
services.AddControllers().AddNewtonsoftJson(a =>
{
a.SerializerSettings.MissingMemberHandling = MissingMemberHandling.Error;
}
But instead of receiving an Exception, we end up with a 'null' request object for the API-call:
Why don't we get an Exception?