This Web API action returns an HTTP 500 (Internal Server Error) status code:
public IHttpActionResult Post()
{
return InternalServerError();
}
But this action returns an HTTP 400 (Bad Request) status code:
public IHttpActionResult Post()
{
return InternalServerError(new Exception());
}
The documentation on this method reads:
> Creates an System.Web.Http.Results.ExceptionResult (500 Internal Server Error) with the specified exception.
I would expect both actions to return a 500 status code.
Comments: Duplicate of 1318 (which has been fixed).
public IHttpActionResult Post()
{
return InternalServerError();
}
But this action returns an HTTP 400 (Bad Request) status code:
public IHttpActionResult Post()
{
return InternalServerError(new Exception());
}
The documentation on this method reads:
> Creates an System.Web.Http.Results.ExceptionResult (500 Internal Server Error) with the specified exception.
I would expect both actions to return a 500 status code.
Comments: Duplicate of 1318 (which has been fixed).