title: Can't get error message on BadRequest in Web Api 2
body: <p>I've googled a lot searching for an answer to my problem with no luck so, let's try if someone else can help me.</p>
  
  <p>I have a Web Api 2 action to register an user after doing some validations. If everything works, it return the serialized user and if don't, an error message sent within a BadRequest response.</p>
  
  <p>At the other hand, I have a WPF client that calls the API for a response.</p>
  
  <p>My problem is that I can't get the reason sent by the error, the client just get the Bad Request error message.</p>
  
  <p>This is a part of the code:</p>
  
  <ul>
  <li><p>Web Api Action:
  </p>
  
  <pre><code>public async Task&lt;IHttpActionResult&gt; AddUser(NewUserDTO {
      if (!ModelState.IsValid)
      {
          return BadRequest(ModelState);
      }
      if (!model.IdCliente.HasValue)
      {
          ModelState.AddModelError("", "No existe el cliente");
          return BadRequest(ModelState);
      }
      // do save stuff
      return Ok(TheModelFactory.Create(user));
  }
  </code></pre></li>
  <li><p>Client function:
  </p>
  
  <pre><code>public async Task&lt;ApplicationUserDTO&gt; AddUser(NewUserDTO dto) {
      using (var client = new HttpClient()) {
          client.BaseAddress = new Uri(_urlBase);
          client.DefaultRequestHeaders.Accept.Clear();
          client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
          client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Token);
          HttpContent content = new StringContent(JsonConvert.SerializeObject(dto));
          content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
          HttpResponseMessage responseMessage = await client.PostAsync("api/accounts/AddUser", content);
          if (responseMessage.IsSuccessStatusCode) {
              var responseJson = await responseMessage.Content.ReadAsStringAsync();
              user = JsonConvert.DeserializeObject&lt;ApplicationUserDTO&gt;(responseJson);
          }
          else
               MessageBox.Show(responseMessage.Content.ReadAsStringAsync().Result);
          return user;
      } 
  }
  </code></pre></li>
  </ul>
  
  <p>Anyone can help?</p>
  
  <p>Edited:</p>
  
  <ul>
  <li><p>DTO:
  </p>
  
  <pre><code>[Serializable]
  public class NewUserDTO {
  public int? IdCliente { get; set; }
  [Required]
  public string UserName { get; set; }
  [Required]
  public string Email { get; set; }
  public string Role { get; set; }
  public string Password { get; set; } }
  </code></pre></li>
  </ul>
  
  <p>Anyway... the dto is sent correctly to api nut, here's the serialized dto as you asked for:</p>
  
  <pre><code>"{\"IdCliente\":null,\"UserName\":\"Toni\",\"Email\":\"soft@moreno-csa.com\",\"Role\":\"Filtra\",\"Password\":\"TONI\"}"
  </code></pre>