Why am I having trouble reading the error message in AngularJS from this code snippet?
ModelState.AddModelError("field", "error");
return BadRequest(ModelState);
Alternatively,
return BadRequest("error message");
return Content(System.Net.HttpStatusCode.BadRequest, new { field = "error"});
Whenever I catch this error, all I see is:
{
data: "Bad request",
status: 400, headers: ..... ,
config: //POST method config,
statusText: "Bad Request"
}