Fixes Bug where 500 responses show messages
Closes-Bug: 1404938 Change-Id: I46c1038b8ba21217455a6980efeb8964e615df4b
This commit is contained in:
parent
fe165fbeef
commit
51855c337f
|
@ -59,9 +59,9 @@ class ErrorHook(hooks.PecanHook):
|
|||
extra=exception_payload
|
||||
)
|
||||
|
||||
message['message'] = str(exception)
|
||||
if hasattr(exception, 'status'):
|
||||
exception_payload['status'] = exception.status
|
||||
message['message'] = str(exception)
|
||||
|
||||
return webob.Response(
|
||||
json.dumps(message),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
pbr>=0.5.21,<1.0
|
||||
pbr
|
||||
|
||||
Babel>=1.3
|
||||
netaddr>=0.7.6
|
||||
|
|
Loading…
Reference in New Issue