pub enum PolestarError {
AuthError(String),
InvalidCredentials,
TokenExpired,
OidcConfigError(String),
ApiError(String),
NetworkError(Error),
ParseError(Error),
InvalidVin(String),
RateLimitExceeded,
GraphQLError(String),
}Expand description
Errors that can occur when interacting with the Polestar API.
Variants§
AuthError(String)
Authentication failed (invalid or expired token).
InvalidCredentials
Invalid credentials provided (ERR001).
TokenExpired
Token has expired and refresh failed.
OidcConfigError(String)
OIDC configuration unavailable.
ApiError(String)
API request failed with an error message.
NetworkError(Error)
Network error occurred during the request.
ParseError(Error)
JSON parsing error.
InvalidVin(String)
Invalid VIN provided.
RateLimitExceeded
Rate limit exceeded (HTTP 429).
GraphQLError(String)
GraphQL error from the API.
Trait Implementations§
Source§impl Debug for PolestarError
impl Debug for PolestarError
Source§impl Display for PolestarError
impl Display for PolestarError
Source§impl Error for PolestarError
impl Error for PolestarError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for PolestarError
impl From<Error> for PolestarError
Auto Trait Implementations§
impl Freeze for PolestarError
impl !RefUnwindSafe for PolestarError
impl Send for PolestarError
impl Sync for PolestarError
impl Unpin for PolestarError
impl !UnwindSafe for PolestarError
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
Mutably borrows from an owned value. Read more