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

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo