Exceptions raised by the Horizon code and the machinery for handling them.
Bases: horizon.exceptions.HorizonException
Exception to be raised when trying to create an API resource which already exists.
Bases: horizon.exceptions.HorizonException
Generic error to replace all “BadRequest”-type API errors.
Bases: horizon.exceptions.HorizonException
Exception to be raised when invalid settings have been provided.
Bases: horizon.exceptions.HorizonException
Generic error to replace all “Conflict”-type API errors.
Bases: horizon.exceptions.HorizonException
Exception to be raised when the value of get_file did not start with https:// or http://
Bases: horizon.exceptions.HorizonException
Used internally to track exceptions that have gone through horizon.exceptions.handle() more than once.
Bases: exceptions.Exception
Base exception class for distinguishing our own exception classes.
Bases: django.views.debug.SafeExceptionReporterFilter
Error report filter that’s always active, even in DEBUG mode.
Bases: horizon.exceptions.HorizonException
Error class which can be raised from within a handler to cause an early bailout and redirect at the middleware level.
Bases: horizon.exceptions.HorizonException
Exception raised during message notification.
Bases: horizon.exceptions.HorizonException
Raised when a user is trying to make requests and they are not logged in.
The included HorizonMiddleware catches NotAuthenticated and handles it gracefully by displaying an error message and redirecting the user to a login page.
Bases: horizon.exceptions.HorizonException
Raised whenever a user attempts to access a resource which they do not have permission-based access to (such as when failing the require_perms() decorator).
The included HorizonMiddleware catches NotAuthorized and handles it gracefully by displaying an error message and redirecting the user to a login page.
Bases: horizon.exceptions.HorizonException
Exception to be raised when something is not available.
Bases: horizon.exceptions.HorizonException
Generic error to replace all “Not Found”-type API errors.
Bases: horizon.exceptions.HorizonException
Generic error to replace any “Recoverable”-type API errors.
Bases: horizon.exceptions.HorizonException
Raised when a requested service is not available in the ServiceCatalog returned by Keystone.
Bases: horizon.exceptions.HorizonException
Exception to be raised when something goes wrong in a workflow.
Bases: horizon.exceptions.HorizonException
Exception raised during workflow validation if required data is missing, or existing data is not valid.
Checks an exception for given keywords and raises a new ActionError with the desired message if the keywords are found. This allows selective control over API error messages.
Centralized error handling for Horizon.
Because Horizon consumes so many different APIs with completely different Exception types, it’s necessary to have a centralized place for handling exceptions which may be raised.
Exceptions are roughly divided into 3 types:
All other exceptions bubble the stack as normal unless the ignore argument is passed in as True, in which case only unrecognized errors are bubbled.
If the exception is not re-raised, an appropriate wrapper exception class indicating the type of exception that was encountered will be returned.