Merge "Return 503 if engine overloaded/unresponsive"
This commit is contained in:
commit
672ca87558
|
@ -334,7 +334,7 @@ class DseNode(object):
|
|||
except (messaging_exceptions.MessagingTimeout,
|
||||
messaging_exceptions.MessageDeliveryFailure):
|
||||
msg = "Request to service '%s' timed out"
|
||||
raise exception.NotFound(msg % service_id)
|
||||
raise exception.Unavailable(msg % service_id)
|
||||
LOG.trace("<%s> RPC call returned: %s", self.node_id, result)
|
||||
return result
|
||||
|
||||
|
|
|
@ -132,6 +132,11 @@ class NotFound(CongressException):
|
|||
code = 404
|
||||
|
||||
|
||||
class Unavailable(CongressException):
|
||||
msg_fmt = _("Service Unavailable.")
|
||||
code = 503
|
||||
|
||||
|
||||
class PolicyNotAuthorized(Forbidden):
|
||||
msg_fmt = _("Policy doesn't allow %(action)s to be performed.")
|
||||
|
||||
|
|
Loading…
Reference in New Issue