At times, when client sends an incorrect data to a API COntroller method, the request object become NULL when received. The primary cause of request object turning NULL could be client passing NULL value to a Non-Null property etc etc.
I would like to get that actual request object which client had sent so that I can get to know what client has passed and resolve the issue.
I receive my request object as:
HttpPost]
[Route("addQuote")]
public JsonResult AddQuote([FromBody]AddQuoteRequestModel quoteRequestModel) { //Lines of code }
Here, at times the quoteRequestModel object is received as NULL. I would like to capture the exact JSON client has passed in to this method.
Is there any way I can capture that?