I am currently using the following to raise a HTTP bad request:
raise tornado.web.HTTPError(400)
which returns a html output:
&
You may simulate RequestHandler.send_error method:
class MyHandler(tornado.web.RequestHandler): def get(self): self.clear() self.set_status(400) self.finish("My custom body")