As a part of the fix for LP#
1505153, the invalid
response of 0 was changed to 400 to fix a running
issue with the new version of WebOb.
It was pointed out after the fact however that a
500 might be more appropriate here.
Additionally, other projects have implemented a 500
as the default so for the sake of consistency we should
consider doing the same.
This patch just changes the 400 to a 500 as the default
code.
Change-Id: Ie486dc49c927f9b50f07c1fc562e89c090924a40
Closes-Bug: #
1505488
class ConvertedException(webob.exc.WSGIHTTPException):
- def __init__(self, code=400, title="", explanation=""):
+ def __init__(self, code=500, title="", explanation=""):
self.code = code
# There is a strict rule about constructing status line for HTTP:
# '...Status-Line, consisting of the protocol version followed by a
def test_default_args(self):
exc = exception.ConvertedException()
self.assertNotEqual('', exc.title)
- self.assertEqual(400, exc.code)
+ self.assertEqual(500, exc.code)
self.assertEqual('', exc.explanation)
def test_standard_status_code(self):