错误的HTTP状态代码:422

时间:2013-02-02 12:13:17

标签: python-2.7 tornado

我正在使用Tornado编写REST API

尝试使用

raise tornado.web.HTTPError(422)

得到此错误

Bad HTTP status code: 422

请帮助解决这个问题

1 个答案:

答案 0 :(得分:0)

web.py的来源如下:

if e.status_code not in httplib.responses:
   logging.error("Bad HTTP status code: %d", e.status_code)
   self.send_error(500)

我们怀疑422在龙卷风中不被认为是合适的状态吗?