Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License.
# Tests use this to make exception message format errors fatal
"""Base error class.
Child classes should define an HTTP status code, title, and a doc string.
"""
"""Use the doc string as the error message by default."""
except KeyError as e: # if you see this warning in your logs, please raise a bug report if _FATAL_EXCEPTION_FORMAT_ERRORS: raise e else: LOG.warning('missing exception kwargs (programmer error)') message = self.__doc__
"""Builds and returns an exception message.
:raises: KeyError given insufficient kwargs
"""
"""Expecting to find %(attribute)s in %(target)s.
The server could not comply with the request since it is either malformed or otherwise incorrect.
The client is assumed to be in error.
"""
"""String length exceeded.
The length of string "%(string)s" exceeded the limit of column %(type)s(CHAR(%(length)d)).
"""
"""Request attribute %(attribute)s must be less than or equal to %(size)i.
The server could not comply with the request because the attribute size is invalid (too large).
The client is assumed to be in error.
"""
"""Avoids exposing details of security failures, unless in debug mode."""
"""Only returns detailed messages in debug mode.""" else:
"""The request you have made requires authentication."""
"""Authentication plugin error."""
"""Attempted to authenticate with an unsupported method."""
"""Additional authentications steps required."""
"""You are not authorized to perform the requested action."""
"""You are not authorized to perform the requested action, %(action)s."""
"""Could not find, %(target)s."""
"""Could not find endpoint, %(endpoint_id)s."""
"""An unhandled exception has occurred: Could not find metadata.""" # (dolph): metadata is not a user-facing concept, # so this exception should not be exposed
"""Could not find policy, %(policy_id)s."""
"""Could not find role, %(role_id)s."""
"""Could not find service, %(service_id)s."""
"""Could not find domain, %(domain_id)s."""
"""Could not find project, %(project_id)s."""
"""Could not find token, %(token_id)s."""
"""Could not find user, %(user_id)s."""
"""Could not find group, %(group_id)s."""
"""Could not find trust, %(trust_id)s."""
"""Could not find credential, %(credential_id)s."""
"""Could not find version, %(version)s."""
"""Conflict occurred attempting to store %(type)s.
%(details)s
"""
"""Request is too large."""
"""An unexpected error prevented the server from fulfilling your request.
%(exception)s
"""
"""Malformed endpoint URL (%(endpoint)s), see ERROR log for details."""
"""The action you have requested has not been implemented."""
"""The Keystone paste configuration file %(config_file)s could not be found. """ |