title: HTTP post returning 500
body: <p>I have this HTTP POST api call.  Most of the time, posting works OK, but there are cases that I am getting error 500 when posting.  When there is an error, I am getting {&quot;Error&quot;:&quot;Bad Request&quot;} as a response and it NEVER call the API method in the back end.  So I suspect that the problem is in the &quot;descrip&quot; value.  Below is the code that calls the API.</p>
  <pre><code>                var dataRequest = {
                      &quot;engagement&quot;: {
                          &quot;descrip&quot;: $('#engDes').val(),
                      }
                  }
  
                  $.ajax({
                      method: 'post', url: APIUrl + &quot;engagement&quot;,
                      data: dataRequest,
                      contentType: &quot;application/json;&quot;,
                      headers: { Authorization: 'bearer ' + token }
                  }).done(response =&gt; {
                      console.log(&quot;SUCCESSFULLY ADDED ENGAGEMENT!&quot;);
                  }).fail(function (xhr, status, error) {
                      var errorMessage = xhr.status + ': ' + xhr.statusText;
                      console.log('Error - ' + errorMessage);
                  });  
  </code></pre>