c# - Why does BadRequest(ModelState) return Status Code 500? -
i have web api controller turning return badrequest(modelstate)
if fails modelsatate.isvalid
check so.
if(modelstate.isvalid) { return badrequest(modelstate); }
but why response code 500 , not 400? if return badrequest()
without modelstate, 400.
if(modelstate.isvalid) { return badrequest(); }