More informative HTTP error messages

I added some more informative error messages for HTTP 400/3/12 and 500 errors. The error messages only show if `DEBUG==True`

Feel free to include these if you think they're useful, or not. 

An alternative would be to raise an exception and let the Flask debugger intercept and render it, but short HTML snippets seem better for debugging an API.