Closed
Description
I am going to test bad request (400) with a customized error message. The test gets 400 as status code; however the content body is empty.
[HttpPost]
public override async Task<IActionResult> PostAsync([FromBody] Contract.User entity)
{
if (entity == null)
{
return Error(new Error() { Status = "400", Title = "Invalid request body", Detail = "The provided request
entity body is not valid." });
}
return await base.PostAsync(entity);
}