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(); } 


Popular posts from this blog

Apache NiFi ExecuteScript: Groovy script to replace Json values via a mapping file -

python 3.x - PyQt5 - Signal : pyqtSignal no method connect -