title: How to return error messages in JSON with Bottle HTTPError?
body: <p>I have a bottle server that returns HTTPErrors as such:</p>
  
  <pre><code>return HTTPError(400, "Object already exists with that name")
  </code></pre>
  
  <p>When I receive this response in the browser, I'd like to be able to pick out the error message given. As it is right now I can see the error message in the response's <code>responseText</code> field, but it's buried in an HTML string that I'd rather not parse if I don't have to. </p>
  
  <p>Is there any way I can specifically set the error message in Bottle so I can pick it out in JSON in the browser?</p>