Merge "Fix nits from 'HTTP constants' patch"
This commit is contained in:
commit
d9fccbd5ab
@ -478,7 +478,7 @@ class Node(base.APIBase):
|
||||
except exception.ChassisNotFound as e:
|
||||
# Change error code because 404 (NotFound) is inappropriate
|
||||
# response for a POST request to create a Port
|
||||
e.code = http_client.BAD_REQUEST # BadRequest
|
||||
e.code = http_client.BAD_REQUEST
|
||||
raise e
|
||||
elif value == wtypes.Unset:
|
||||
self._chassis_uuid = wtypes.Unset
|
||||
|
@ -135,6 +135,8 @@ class NoExceptionTracebackHook(hooks.PecanHook):
|
||||
return
|
||||
|
||||
# Do nothing if there is no error.
|
||||
# Status codes in the range 200 (OK) to 399 (400 = BAD_REQUEST) are not
|
||||
# an error.
|
||||
if (http_client.OK <= state.response.status_int <
|
||||
http_client.BAD_REQUEST):
|
||||
return
|
||||
|
@ -443,7 +443,7 @@ class NodeNotLocked(Invalid):
|
||||
class NoFreeConductorWorker(TemporaryFailure):
|
||||
message = _('Requested action cannot be performed due to lack of free '
|
||||
'conductor workers.')
|
||||
code = http_client.SERVICE_UNAVAILABLE # Service Unavailable (temporary).
|
||||
code = http_client.SERVICE_UNAVAILABLE
|
||||
|
||||
|
||||
class VendorPassthruException(IronicException):
|
||||
|
Loading…
Reference in New Issue
Block a user