As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit
Python 2 support on Google Cloud.
Exceptions¶Exceptions raised by Google API core & clients.
This module provides base classes for all errors raised by libraries based on google.api_core
, including both HTTP and gRPC clients.
Bases: google.api_core.exceptions.Conflict
Exception mapping a grpc.StatusCode.ABORTED
error.
Bases: google.api_core.exceptions.Conflict
Exception mapping a grpc.StatusCode.ALREADY_EXISTS
error.
Bases: NotImplementedError
Raised when an unsupported parameter is configured against async rest transport.
Bases: google.api_core.exceptions.ServerError
Exception mapping a 502 Bad Gateway
response.
Bases: google.api_core.exceptions.ClientError
Exception mapping a 400 Bad Request
response.
Bases: google.api_core.exceptions.ClientError
Exception mapping a grpc.StatusCode.CANCELLED
error.
Bases: google.api_core.exceptions.GoogleAPICallError
Base class for all client error (HTTP 4xx) responses.
Bases: google.api_core.exceptions.ClientError
Exception mapping a 409 Conflict
response.
Bases: google.api_core.exceptions.ServerError
Exception mapping a grpc.StatusCode.DATA_LOSS
error.
Bases: google.api_core.exceptions.GatewayTimeout
Exception mapping a grpc.StatusCode.DEADLINE_EXCEEDED
error.
Bases: google.api_core.exceptions.GoogleAPIError
Raised when multiple credentials are passed.
Bases: google.api_core.exceptions.BadRequest
Exception mapping a grpc.StatusCode.FAILED_PRECONDITION
error.
Bases: google.api_core.exceptions.ClientError
Exception mapping a 403 Forbidden
response.
Bases: google.api_core.exceptions.ServerError
Exception mapping a 504 Gateway Timeout
response.
Bases: google.api_core.exceptions.GoogleAPIError
Base class for exceptions raised by calling API methods.
message (str) – The exception message.
errors (Sequence[Any]) – An optional list of error details.
details (Sequence[Any]) – An optional list of objects defined in google.rpc.error_details.
response (Union[requests.Request, grpc.Call]) – The response or gRPC call metadata.
error_info (Union[error_details_pb2.ErrorInfo, None]) – An optional object containing error info (google.rpc.error_details.ErrorInfo).
The HTTP status code associated with this error.
This may be None
if the exception does not have a direct mapping to an HTTP error.
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
Optional[int]
Information contained in google.rpc.status.details.
https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto
A list of structured objects from error_details.proto
Sequence[Any]
The logical grouping to which the “reason” belongs.
An optional string containing a logical grouping to which the “reason” belongs.
Union[str, None]
Detailed error information.
A list of additional error details.
Sequence[Any]
The gRPC status code associated with this error.
This may be None
if the exception does not match up to a gRPC error.
Optional[grpc.StatusCode]
The exception message.
Additional structured details about this error.
The reason of the error.
An optional string containing reason of the error.
Union[str, None]
The response or gRPC call metadata.
Optional[Union[requests.Request, grpc.Call]]
Bases: Exception
Base class for all exceptions raised by Google API Clients.
Bases: google.api_core.exceptions.ServerError
Exception mapping a 500 Internal Server Error
response. or a grpc.StatusCode.INTERNAL
error.
Bases: google.api_core.exceptions.BadRequest
Exception mapping a grpc.StatusCode.INVALID_ARGUMENT
error.
Bases: google.api_core.exceptions.ClientError
Exception mapping a 411 Length Required
response.
Bases: google.api_core.exceptions.ClientError
Exception mapping a 405 Method Not Allowed
response.
Bases: google.api_core.exceptions.ServerError
Exception mapping a 501 Not Implemented
response or a grpc.StatusCode.UNIMPLEMENTED
error.
Bases: google.api_core.exceptions.Redirection
Exception mapping a 301 Moved Permanently
response.
Bases: google.api_core.exceptions.ClientError
Exception mapping a 404 Not Found
response or a grpc.StatusCode.NOT_FOUND
error.
Bases: google.api_core.exceptions.Redirection
Exception mapping a 304 Not Modified
response.
Bases: google.api_core.exceptions.BadRequest
Exception mapping a grpc.StatusCode.OUT_OF_RANGE
error.
Bases: google.api_core.exceptions.Forbidden
Exception mapping a grpc.StatusCode.PERMISSION_DENIED
error.
Bases: google.api_core.exceptions.ClientError
Exception mapping a 412 Precondition Failed
response.
Bases: google.api_core.exceptions.GoogleAPICallError
Base class for for all redirection (HTTP 3xx) responses.
Bases: google.api_core.exceptions.ClientError
Exception mapping a 416 Request Range Not Satisfiable
response.
Bases: google.api_core.exceptions.TooManyRequests
Exception mapping a grpc.StatusCode.RESOURCE_EXHAUSTED
error.
Bases: google.api_core.exceptions.Redirection
Exception mapping a 308 Resume Incomplete
response.
Note
http.client.PERMANENT_REDIRECT
is 308
, but Google APIs differ in their use of this status code.
Bases: google.api_core.exceptions.GoogleAPIError
Raised when a function has exhausted all of its available retries.
The last exception raised when retrying the function.
Bases: google.api_core.exceptions.GoogleAPICallError
Base for 5xx responses.
Bases: google.api_core.exceptions.ServerError
Exception mapping a 503 Service Unavailable
response or a grpc.StatusCode.UNAVAILABLE
error.
Bases: google.api_core.exceptions.Redirection
Exception mapping a 307 Temporary Redirect
response.
Bases: google.api_core.exceptions.ClientError
Exception mapping a 429 Too Many Requests
response.
Bases: google.api_core.exceptions.Unauthorized
Exception mapping a grpc.StatusCode.UNAUTHENTICATED
error.
Bases: google.api_core.exceptions.ClientError
Exception mapping a 401 Unauthorized
response.
Bases: google.api_core.exceptions.ServerError
Exception mapping a grpc.StatusCode.UNKNOWN
error.
Return the exception class for a specific grpc.StatusCode
.
status_code (grpc.StatusCode) – The gRPC status code.
the appropriate subclass of GoogleAPICallError
.
type()
Return the exception class for a specific HTTP status code.
status_code (int) – The HTTP status code.
the appropriate subclass of GoogleAPICallError
.
type()
Create a GoogleAPICallError
from a google auth rest response.
Union[google.auth.transport.Response (response) – The HTTP response.
google.auth.aio.transport.Response] – The HTTP response.
Optional (payload) – The HTTP request method.
Optional – The HTTP request url.
Optional – The HTTP response payload. If not passed in, it is read from response for a response type of google.auth.transport.Response.
GoogleAPICallError
, with the message and errors populated from the response.
Create a GoogleAPICallError
from a grpc.RpcError
.
rpc_exc (grpc.RpcError) – The gRPC error.
Create a GoogleAPICallError
from a grpc.StatusCode
.
status_code (Union[grpc.StatusCode, int]) – The gRPC status code.
message (str) – The exception message.
kwargs – Additional arguments passed to the GoogleAPICallError
constructor.
Create a GoogleAPICallError
from a requests.Response
.
response (requests.Response) – The HTTP response.
GoogleAPICallError
, with the message and errors populated from the response.
Create a GoogleAPICallError
from an HTTP status code.
status_code (int) – The HTTP status code.
message (str) – The exception message.
kwargs – Additional arguments passed to the GoogleAPICallError
constructor.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4