Merge "Dejokerizes 404 logs."

This commit is contained in:
Zuul 2019-12-06 17:03:47 +00:00 committed by Gerrit Code Review
commit d633693bb0
7 changed files with 7 additions and 14 deletions

View File

@ -29,8 +29,7 @@ LOG = utils.getLogger(__name__)
def _consumer_not_found():
"""Throw exception indicating consumer not found."""
pecan.abort(404, u._('Not Found. Sorry but your consumer is in '
'another castle.'))
pecan.abort(404, u._('Consumer not found.'))
def _consumer_ownership_mismatch():

View File

@ -33,8 +33,7 @@ CONTAINER_GET = 'container:get'
def container_not_found():
"""Throw exception indicating container not found."""
pecan.abort(404, u._('Not Found. Sorry but your container is in '
'another castle.'))
pecan.abort(404, u._('Secrets container not found.'))
def invalid_container_id():

View File

@ -32,8 +32,7 @@ _DEPRECATION_MSG = '%s has been deprecated in the Newton release. ' \
def _order_not_found():
"""Throw exception indicating order not found."""
pecan.abort(404, u._('Not Found. Sorry but your order is in '
'another castle.'))
pecan.abort(404, u._('Order not found.'))
def _secret_not_in_order():

View File

@ -29,8 +29,7 @@ LOG = utils.getLogger(__name__)
def _project_quotas_not_found():
"""Throw exception indicating project quotas not found."""
pecan.abort(404, u._('Not Found. Sorry but your project quotas are in '
'another castle.'))
pecan.abort(404, u._('Project quotas not found.'))
class QuotasController(controllers.ACLMixin):

View File

@ -25,8 +25,7 @@ LOG = utils.getLogger(__name__)
def _secret_metadata_not_found():
"""Throw exception indicating secret metadata not found."""
pecan.abort(404, u._('Not Found. Sorry but your secret metadata is in '
'another castle.'))
pecan.abort(404, u._('Secret metadata not found.'))
class SecretMetadataController(controllers.ACLMixin):

View File

@ -37,8 +37,7 @@ LOG = utils.getLogger(__name__)
def _secret_not_found():
"""Throw exception indicating secret not found."""
pecan.abort(404, u._('Not Found. Sorry but your secret is in '
'another castle.'))
pecan.abort(404, u._('Secret not found.'))
def _invalid_secret_id():

View File

@ -204,8 +204,7 @@ class SecretAcceptNotSupportedException(exception.BarbicanHTTPException):
class SecretNotFoundException(exception.BarbicanHTTPException):
"""Raised when secret information could not be located."""
client_message = u._("Not Found. Sorry but your secret is in another "
"castle")
client_message = u._("Secret not found.")
status_code = 404
def __init__(self):