title: MissingMemberHandling.Error force exception when deserializing the HTTP body
body: <p>I am creating a restful web-service using .net and Newtonsoft for serialization/deserialization.</p>
  
  <p>The aim is to force exceptions (preferably HTTP 400) when a required property is not included in the request.</p>
  
  <ol>
  <li><p>Serializer configuration</p>
  
  <pre><code>config.Formatters.JsonFormatter.SerializerSettings = new JsonSerializerSettings {
          MissingMemberHandling = MissingMemberHandling.Error,
          Error = delegate (object x, ErrorEventArgs error) {
              System.Diagnostics.Debug.WriteLine (error.ErrorContext.Error);
              throw new Exception("");
      }
  };
  </code></pre></li>
  <li><p>Model</p>
  
  <pre><code>[DataContract]
  public class MyObject {
      [JsonProperty(PropertyName = "id", Required = Required.Always)]
      public string Id { get; set; }
  }
  </code></pre></li>
  <li><p>Restful end-point</p>
  
  <pre><code>public IHttpActionResult MyAction([FromBody]MyObject request)
  </code></pre></li>
  </ol>
  
  <hr>
  
  <p><strong>Testing:</strong></p>
  
  <p>When a request is fired the flow goes like this:</p>
  
  <ol>
  <li>The break point of the error delegate hits ('1. Serializer configuration') and i am able to see the error log. The error is 'swallowed' and the execution is continuing in the controller.</li>
  <li>The execution fails in another part of the web service.</li>
  </ol>
  
  <p>Hence... i am able to capture the error using the delegate, but not able to propagate it (not setting a delegate at all again does not make a difference).</p>
  
  <p><strike>Isn't it fair to expect that by setting the 'MissingMemberHandling.Error', i should actually see an error in my controller?</strike></p>
  
  <p>Isn't it fair to expect that by indicating a property as 'required', i should actually see an error in my controller?</p>
  
  <hr>
  
  <p><strong>Goal:</strong></p>
  
  <p>Instead of silently failing, I would like to force an error when the HTTP body deserialzation fails.</p>