pub enum Error {
Show 18 variants
BadRequest(CdfApiError),
Unauthorized(CdfApiError),
Forbidden(CdfApiError),
NotFound(CdfApiError),
Conflict(CdfApiError),
UnprocessableEntity(CdfApiError),
OtherApiError(CdfApiError),
EnvironmentVariableMissing(String),
Authenticator(AuthenticatorError),
InvalidHeader(InvalidHeaderValue),
IOError(Error),
StreamError(Error),
Middleware(Error),
Config(String),
Reqwest(Error),
SerdeJson(Error),
Prost(DecodeError),
Other(String),
}Expand description
Cognite SDK Error.
Variants§
BadRequest(CdfApiError)
A bad request error (400)
An unauthorized (401) error. When received from CDF this typically means that the token is not valid for any project in the tenant.
Forbidden(CdfApiError)
A forbidden (403) error. When received from CDF this typically means that the user lacks access to the requested resource.
NotFound(CdfApiError)
A not found (404) error.
Conflict(CdfApiError)
A conflict (409) error.
UnprocessableEntity(CdfApiError)
An unprocessable entity (422) error.
OtherApiError(CdfApiError)
A different CDF error not covered by the common variants in this enum.
EnvironmentVariableMissing(String)
Error returned due to a missing environment variable
Authenticator(AuthenticatorError)
Error from the authenticator.
InvalidHeader(InvalidHeaderValue)
Error caused by an invalid header, for example one containing non-ascii symbols.
IOError(Error)
Error reading from a file.
StreamError(Error)
Error collecting a stream.
Middleware(Error)
Error in middleware.
Config(String)
Error in configuration.
Reqwest(Error)
Reqwest error
SerdeJson(Error)
Serde JSON error. Serde JSON error.
Prost(DecodeError)
Prost (protobuf deserializer) error
Other(String)
Something else went wrong.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()