pub enum Error {
Show 22 variants
NoAuthMethod(Box<Error>, Box<Error>, Box<Error>, Box<Error>),
TLSError(Error),
OAuthConnectionError(Error),
OAuthParsingError(Error),
ApplicationProfileMissing,
ApplicationProfilePath(Error),
ApplicationProfileFormat(Error),
UserProfilePath(Error),
UserProfileFormat(Error),
ConnectionError(Error),
ParsingError(Error),
ServerUnavailable(String),
SignerSchemeError,
SignerInit,
NoHomeDir,
NoProjectId,
ProjectIdNotFound,
ProjectIdNonUtf8,
GCloudNotFound,
GCloudError,
GCloudParseError,
IOError(Error),
}
Expand description
Enumerates all possible errors returned by this library.
Variants
NoAuthMethod(Box<Error>, Box<Error>, Box<Error>, Box<Error>)
No available authentication method was discovered
Application can authenticate against GCP using:
- Default service account - available inside GCP platform using GCP Instance Metadata server
- Service account file - provided using
GOOGLE_APPLICATION_CREDENTIALS
with path - GCloud authorized user - retrieved using
gcloud auth
command
All authentication methods have been tested and none succeeded. Service account file can be downloaded from GCP in json format.
TLSError(Error)
Error in underlying RustTLS library. Might signal problem with establishing secure connection using trusted certificates
OAuthConnectionError(Error)
Error when establishing connection to OAuth server
OAuthParsingError(Error)
Error when parsing response from OAuth server
ApplicationProfileMissing
Variable GOOGLE_APPLICATION_CREDENTIALS
could not be found in the current environment
GOOGLE_APPLICATION_CREDENTIALS is used for providing path to json file with applications credentials. File can be downloaded in GCP Console when creating service account.
ApplicationProfilePath(Error)
Wrong path to custom application profile credentials provided
Path has to be defined using GOOGLE_APPLICATION_CREDENTIALS
environment variable
ApplicationProfileFormat(Error)
Wrong format of custom application profile
Application profile is downloaded from GCP console and is stored in filesystem on the server.
Full path is passed to library by setting GOOGLE_APPLICATION_CREDENTIALS
variable with path as a value.
UserProfilePath(Error)
Default user profile not found
User can authenticate locally during development using gcloud auth login
which results in creating
~/.config/gcloud/application_default_credentials.json
which couldn’t be find on the machine
UserProfileFormat(Error)
Wrong format of user profile
ConnectionError(Error)
Could not connect to server
ParsingError(Error)
Could not parse response from server
ServerUnavailable(String)
Could not connect to server
SignerSchemeError
Could not determine signer scheme
SignerInit
Could not initialize signer
NoHomeDir
Could not find Home directory in the environment
NoProjectId
Project ID not supported for current authentication method
ProjectIdNotFound
Project ID not found through current authentication method
ProjectIdNonUtf8
Project ID is invalid UTF-8
GCloudNotFound
GCloud executable not found
GCloudError
GCloud returned an error status
GCloudParseError
GCloud output couldn’t be parsed
IOError(Error)
Represents all other cases of std::io::Error
.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more