keystoneauth1.exceptions.http module

HTTP Exceptions used by keystoneauth1.

exception keystoneauth1.exceptions.http.BadGateway(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HttpServerError

HTTP 502 - Bad Gateway.

The server was acting as a gateway or proxy and received an invalid response from the upstream server.

__annotations__ = {}
__doc__ = 'HTTP 502 - Bad Gateway.\n\n    The server was acting as a gateway or proxy and received an invalid\n    response from the upstream server.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 502
message = 'Bad Gateway'
exception keystoneauth1.exceptions.http.BadRequest(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 400 - Bad Request.

The request cannot be fulfilled due to bad syntax.

__annotations__ = {}
__doc__ = 'HTTP 400 - Bad Request.\n\n    The request cannot be fulfilled due to bad syntax.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 400
message = 'Bad Request'
exception keystoneauth1.exceptions.http.Conflict(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 409 - Conflict.

Indicates that the request could not be processed because of conflict in the request, such as an edit conflict.

__annotations__ = {}
__doc__ = 'HTTP 409 - Conflict.\n\n    Indicates that the request could not be processed because of conflict\n    in the request, such as an edit conflict.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 409
message = 'Conflict'
exception keystoneauth1.exceptions.http.ExpectationFailed(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 417 - Expectation Failed.

The server cannot meet the requirements of the Expect request-header field.

__annotations__ = {}
__doc__ = 'HTTP 417 - Expectation Failed.\n\n    The server cannot meet the requirements of the Expect request-header field.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 417
message = 'Expectation Failed'
exception keystoneauth1.exceptions.http.Forbidden(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 403 - Forbidden.

The request was a valid request, but the server is refusing to respond to it.

__annotations__ = {}
__doc__ = 'HTTP 403 - Forbidden.\n\n    The request was a valid request, but the server is refusing to respond\n    to it.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 403
message = 'Forbidden'
exception keystoneauth1.exceptions.http.GatewayTimeout(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HttpServerError

HTTP 504 - Gateway Timeout.

The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.

__annotations__ = {}
__doc__ = 'HTTP 504 - Gateway Timeout.\n\n    The server was acting as a gateway or proxy and did not receive a timely\n    response from the upstream server.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 504
message = 'Gateway Timeout'
exception keystoneauth1.exceptions.http.Gone(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 410 - Gone.

Indicates that the resource requested is no longer available and will not be available again.

__annotations__ = {}
__doc__ = 'HTTP 410 - Gone.\n\n    Indicates that the resource requested is no longer available and will\n    not be available again.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 410
message = 'Gone'
exception keystoneauth1.exceptions.http.HTTPClientError(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HttpError

Client-side HTTP error.

Exception for cases in which the client seems to have erred.

__annotations__ = {}
__doc__ = 'Client-side HTTP error.\n\n    Exception for cases in which the client seems to have erred.\n    '
__module__ = 'keystoneauth1.exceptions.http'
message = 'HTTP Client Error'
exception keystoneauth1.exceptions.http.HttpError(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: ClientException

The base exception class for all HTTP exceptions.

__annotations__ = {}
__doc__ = 'The base exception class for all HTTP exceptions.'
__init__(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
__module__ = 'keystoneauth1.exceptions.http'
http_status = 0
message = 'HTTP Error'
exception keystoneauth1.exceptions.http.HttpNotImplemented(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HttpServerError

HTTP 501 - Not Implemented.

The server either does not recognize the request method, or it lacks the ability to fulfill the request.

__annotations__ = {}
__doc__ = 'HTTP 501 - Not Implemented.\n\n    The server either does not recognize the request method, or it lacks\n    the ability to fulfill the request.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 501
message = 'Not Implemented'
exception keystoneauth1.exceptions.http.HttpServerError(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HttpError

Server-side HTTP error.

Exception for cases in which the server is aware that it has erred or is incapable of performing the request.

__annotations__ = {}
__doc__ = 'Server-side HTTP error.\n\n    Exception for cases in which the server is aware that it has\n    erred or is incapable of performing the request.\n    '
__module__ = 'keystoneauth1.exceptions.http'
message = 'HTTP Server Error'
exception keystoneauth1.exceptions.http.HttpVersionNotSupported(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HttpServerError

HTTP 505 - HttpVersion Not Supported.

The server does not support the HTTP protocol version used in the request.

__annotations__ = {}
__doc__ = 'HTTP 505 - HttpVersion Not Supported.\n\n    The server does not support the HTTP protocol version used in the request.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 505
message = 'HTTP Version Not Supported'
exception keystoneauth1.exceptions.http.InternalServerError(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HttpServerError

HTTP 500 - Internal Server Error.

A generic error message, given when no more specific message is suitable.

__annotations__ = {}
__doc__ = 'HTTP 500 - Internal Server Error.\n\n    A generic error message, given when no more specific message is suitable.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 500
message = 'Internal Server Error'
exception keystoneauth1.exceptions.http.LengthRequired(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 411 - Length Required.

The request did not specify the length of its content, which is required by the requested resource.

__annotations__ = {}
__doc__ = 'HTTP 411 - Length Required.\n\n    The request did not specify the length of its content, which is\n    required by the requested resource.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 411
message = 'Length Required'
exception keystoneauth1.exceptions.http.MethodNotAllowed(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 405 - Method Not Allowed.

A request was made of a resource using a request method not supported by that resource.

__annotations__ = {}
__doc__ = 'HTTP 405 - Method Not Allowed.\n\n    A request was made of a resource using a request method not supported\n    by that resource.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 405
message = 'Method Not Allowed'
exception keystoneauth1.exceptions.http.NotAcceptable(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 406 - Not Acceptable.

The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.

__annotations__ = {}
__doc__ = 'HTTP 406 - Not Acceptable.\n\n    The requested resource is only capable of generating content not\n    acceptable according to the Accept headers sent in the request.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 406
message = 'Not Acceptable'
exception keystoneauth1.exceptions.http.NotFound(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 404 - Not Found.

The requested resource could not be found but may be available again in the future.

__annotations__ = {}
__doc__ = 'HTTP 404 - Not Found.\n\n    The requested resource could not be found but may be available again\n    in the future.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 404
message = 'Not Found'
exception keystoneauth1.exceptions.http.PaymentRequired(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 402 - Payment Required.

Reserved for future use.

__annotations__ = {}
__doc__ = 'HTTP 402 - Payment Required.\n\n    Reserved for future use.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 402
message = 'Payment Required'
exception keystoneauth1.exceptions.http.PreconditionFailed(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 412 - Precondition Failed.

The server does not meet one of the preconditions that the requester put on the request.

__annotations__ = {}
__doc__ = 'HTTP 412 - Precondition Failed.\n\n    The server does not meet one of the preconditions that the requester\n    put on the request.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 412
message = 'Precondition Failed'
exception keystoneauth1.exceptions.http.ProxyAuthenticationRequired(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 407 - Proxy Authentication Required.

The client must first authenticate itself with the proxy.

__annotations__ = {}
__doc__ = 'HTTP 407 - Proxy Authentication Required.\n\n    The client must first authenticate itself with the proxy.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 407
message = 'Proxy Authentication Required'
exception keystoneauth1.exceptions.http.RequestEntityTooLarge(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 413 - Request Entity Too Large.

The request is larger than the server is willing or able to process.

__annotations__ = {}
__doc__ = 'HTTP 413 - Request Entity Too Large.\n\n    The request is larger than the server is willing or able to process.\n    '
__init__(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)
__module__ = 'keystoneauth1.exceptions.http'
http_status = 413
message = 'Request Entity Too Large'
exception keystoneauth1.exceptions.http.RequestTimeout(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 408 - Request Timeout.

The server timed out waiting for the request.

__annotations__ = {}
__doc__ = 'HTTP 408 - Request Timeout.\n\n    The server timed out waiting for the request.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 408
message = 'Request Timeout'
exception keystoneauth1.exceptions.http.RequestUriTooLong(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 414 - Request-URI Too Long.

The URI provided was too long for the server to process.

__annotations__ = {}
__doc__ = 'HTTP 414 - Request-URI Too Long.\n\n    The URI provided was too long for the server to process.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 414
message = 'Request-URI Too Long'
exception keystoneauth1.exceptions.http.RequestedRangeNotSatisfiable(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 416 - Requested Range Not Satisfiable.

The client has asked for a portion of the file, but the server cannot supply that portion.

__annotations__ = {}
__doc__ = 'HTTP 416 - Requested Range Not Satisfiable.\n\n    The client has asked for a portion of the file, but the server cannot\n    supply that portion.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 416
message = 'Requested Range Not Satisfiable'
exception keystoneauth1.exceptions.http.ServiceUnavailable(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HttpServerError

HTTP 503 - Service Unavailable.

The server is currently unavailable.

__annotations__ = {}
__doc__ = 'HTTP 503 - Service Unavailable.\n\n    The server is currently unavailable.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 503
message = 'Service Unavailable'
exception keystoneauth1.exceptions.http.Unauthorized(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 401 - Unauthorized.

Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.

__annotations__ = {}
__doc__ = 'HTTP 401 - Unauthorized.\n\n    Similar to 403 Forbidden, but specifically for use when authentication\n    is required and has failed or has not yet been provided.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 401
message = 'Unauthorized'
exception keystoneauth1.exceptions.http.UnprocessableEntity(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 422 - Unprocessable Entity.

The request was well-formed but was unable to be followed due to semantic errors.

__annotations__ = {}
__doc__ = 'HTTP 422 - Unprocessable Entity.\n\n    The request was well-formed but was unable to be followed due to semantic\n    errors.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 422
message = 'Unprocessable Entity'
exception keystoneauth1.exceptions.http.UnsupportedMediaType(message: str | None = None, details: str | None = None, response: Response | None = None, request_id: str | None = None, url: str | None = None, method: str | None = None, http_status: int | None = None, retry_after: int = 0)

Bases: HTTPClientError

HTTP 415 - Unsupported Media Type.

The request entity has a media type which the server or resource does not support.

__annotations__ = {}
__doc__ = 'HTTP 415 - Unsupported Media Type.\n\n    The request entity has a media type which the server or resource does\n    not support.\n    '
__module__ = 'keystoneauth1.exceptions.http'
http_status = 415
message = 'Unsupported Media Type'
keystoneauth1.exceptions.http.from_response(response: Response, method: str, url: str) HttpError | MissingAuthMethods

Return an instance of HttpError or subclass based on response.

Parameters:
  • response – instance of requests.Response class

  • method – HTTP method used for request

  • url – URL used for request