google.auth.exceptions module

Exceptions used in the google.auth package.

exception GoogleAuthError(*args, **kwargs)[source]

Bases: Exception

Base class for all google.auth errors.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception TransportError(*args, **kwargs)[source]

Bases: GoogleAuthError

Used to indicate an error occurred during an HTTP request.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception RefreshError(*args, **kwargs)[source]

Bases: GoogleAuthError

Used to indicate that an refreshing the credentials’ access token failed.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception UserAccessTokenError(*args, **kwargs)[source]

Bases: GoogleAuthError

Used to indicate gcloud auth print-access-token command failed.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception DefaultCredentialsError(*args, **kwargs)[source]

Bases: GoogleAuthError

Used to indicate that acquiring default credentials failed.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception MutualTLSChannelError(*args, **kwargs)[source]

Bases: GoogleAuthError

Used to indicate that mutual TLS channel creation is failed, or mutual TLS channel credentials is missing or invalid.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception ClientCertError(*args, **kwargs)[source]

Bases: GoogleAuthError

Used to indicate that client certificate is missing or invalid.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception OAuthError(*args, **kwargs)[source]

Bases: GoogleAuthError

Used to indicate an error occurred during an OAuth related HTTP request.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception ReauthFailError(message=None, **kwargs)[source]

Bases: RefreshError

An exception for when reauth failed.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception ReauthSamlChallengeFailError(message=None, **kwargs)[source]

Bases: ReauthFailError

An exception for SAML reauth challenge failures.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception MalformedError(*args, **kwargs)[source]

Bases: DefaultCredentialsError, ValueError

An exception for malformed data.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception InvalidResource(*args, **kwargs)[source]

Bases: DefaultCredentialsError, ValueError

An exception for URL error.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception InvalidOperation(*args, **kwargs)[source]

Bases: DefaultCredentialsError, ValueError

An exception for invalid operation.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception InvalidValue(*args, **kwargs)[source]

Bases: DefaultCredentialsError, ValueError

Used to wrap general ValueError of python.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception InvalidType(*args, **kwargs)[source]

Bases: DefaultCredentialsError, TypeError

Used to wrap general TypeError of python.

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception OSError(*args, **kwargs)[source]

Bases: DefaultCredentialsError, OSError

Used to wrap EnvironmentError(OSError after python3.3).

errno

POSIX exception code

filename

exception filename

filename2

second exception filename

strerror

exception strerror

with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.