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\nThe server was acting as a gateway or proxy and received an invalid\nresponse from the upstream server.\n'¶
- __firstlineno__ = 362¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nThe request cannot be fulfilled due to bad syntax.\n'¶
- __firstlineno__ = 112¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nIndicates that the request could not be processed because of conflict\nin the request, such as an edit conflict.\n'¶
- __firstlineno__ = 207¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nThe server cannot meet the requirements of the Expect request-header field.\n'¶
- __firstlineno__ = 319¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nThe request was a valid request, but the server is refusing to respond\nto it.\n'¶
- __firstlineno__ = 143¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nThe server was acting as a gateway or proxy and did not receive a timely\nresponse from the upstream server.\n'¶
- __firstlineno__ = 383¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nIndicates that the resource requested is no longer available and will\nnot be available again.\n'¶
- __firstlineno__ = 218¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nException for cases in which the client seems to have erred.\n'¶
- __firstlineno__ = 93¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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.'¶
- __firstlineno__ = 62¶
- __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'¶
- __static_attributes__ = ('details', 'http_status', 'message', 'method', 'request_id', 'response', 'retry_after', 'url')¶
- 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\nThe server either does not recognize the request method, or it lacks\nthe ability to fulfill the request.\n'¶
- __firstlineno__ = 351¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nException for cases in which the server is aware that it has\nerred or is incapable of performing the request.\n'¶
- __firstlineno__ = 102¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nThe server does not support the HTTP protocol version used in the request.\n'¶
- __firstlineno__ = 394¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nA generic error message, given when no more specific message is suitable.\n'¶
- __firstlineno__ = 340¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nThe request did not specify the length of its content, which is\nrequired by the requested resource.\n'¶
- __firstlineno__ = 229¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nA request was made of a resource using a request method not supported\nby that resource.\n'¶
- __firstlineno__ = 165¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nThe requested resource is only capable of generating content not\nacceptable according to the Accept headers sent in the request.\n'¶
- __firstlineno__ = 176¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nThe requested resource could not be found but may be available again\nin the future.\n'¶
- __firstlineno__ = 154¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nReserved for future use.\n'¶
- __firstlineno__ = 133¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nThe server does not meet one of the preconditions that the requester\nput on the request.\n'¶
- __firstlineno__ = 240¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nThe client must first authenticate itself with the proxy.\n'¶
- __firstlineno__ = 187¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nThe request is larger than the server is willing or able to process.\n'¶
- __firstlineno__ = 251¶
- __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'¶
- __static_attributes__ = ('retry_after',)¶
- 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\nThe server timed out waiting for the request.\n'¶
- __firstlineno__ = 197¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nThe URI provided was too long for the server to process.\n'¶
- __firstlineno__ = 287¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nThe client has asked for a portion of the file, but the server cannot\nsupply that portion.\n'¶
- __firstlineno__ = 308¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- http_status = 416¶
- message = 'Requested Range Not Satisfiable'¶
Bases:
HttpServerError
HTTP 503 - Service Unavailable.
The server is currently 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\nSimilar to 403 Forbidden, but specifically for use when authentication\nis required and has failed or has not yet been provided.\n'¶
- __firstlineno__ = 122¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nThe request was well-formed but was unable to be followed due to semantic\nerrors.\n'¶
- __firstlineno__ = 329¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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\nThe request entity has a media type which the server or resource does\nnot support.\n'¶
- __firstlineno__ = 297¶
- __module__ = 'keystoneauth1.exceptions.http'¶
- __static_attributes__ = ()¶
- 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