title: asp.net core middleware can't catch newtonsoft exception
body: <p>i use middleware catch request exception and write response like this </p>
  
  <pre><code>public async Task Invoke(HttpContext context /* other dependencies */)
  {
      try
      {
  
          await next(context);
      }
      catch (Exception ex)
      {
          logger.LogError(ex.Message);
          await HandleExceptionAsync(context, ex); //write response
      }
  }
      private static Task HandleExceptionAsync(HttpContext context, Exception exception)
      {
          FanjiaApiResultMessage resultMessage = new FanjiaApiResultMessage()
          {
              ResultCode = -1,
              Data = null,
              Msg = exception.Message
          };
          string result = JsonConvert.SerializeObject(resultMessage);
          context.Response.ContentType = "application/json;charset=utf-8";
          if (exception is QunarException)
          {
              context.Response.StatusCode = (int)(exception as QunarException).httpStatusCode;
          }
          else
              context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
          return context.Response.WriteAsync(result);
      }
  </code></pre>
  
  <p>a request model param like this </p>
  
  <pre><code>public class FlightModel {
     [JsonProperty("depCity", Required = Required.Always)]
     public string DepCity { get; set; }
  }
  
  public IActionResult Test(FlightModel model){
    return Content("test");
  }
  </code></pre>
  
  <p>when i post the FlightModel without DepCity , i will get the exception </p>
  
  <pre><code>{
      "errors": {
          "": [
              "Required property 'depCity' not found in JSON. Path '', line 6, position 1."
          ]
      },
      "title": "One or more validation errors occurred.",
      "status": 400,
      "traceId": "8000000a-0003-ff00-b63f-84710c7967bb"
  }
  </code></pre>
  
  <p>Obviously the exception are not catched by middleware.</p>
  
  <p>why middleware is not catch?</p>