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
Source§impl From<DecodeError> for Error
impl From<DecodeError> for Error
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Source§impl From<InvalidHeaderValue> for Error
impl From<InvalidHeaderValue> for Error
Source§fn from(source: InvalidHeaderValue) -> Self
fn from(source: InvalidHeaderValue) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPatchItem<UpdateSet<T>> for T
impl<T> IntoPatchItem<UpdateSet<T>> for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.