WeConnectException

Sealed exception hierarchy for all recoverable errors thrown by the library.

Catch specific subtypes to handle different failure modes:

Inheritors

Types

Link copied to clipboard
class ApiError(val statusCode: Int, val body: String, cause: Throwable? = null) : WeConnectException

Catch-all for unexpected non-success HTTP responses.

Link copied to clipboard
class AuthenticationError(message: String, cause: Throwable? = null) : WeConnectException

Login failed, token refresh failed, or session cannot be renewed.

Link copied to clipboard
class ControlError(message: String, cause: Throwable? = null) : WeConnectException

A vehicle command was rejected by the BFF API.

Link copied to clipboard
class RetrievalError(message: String, cause: Throwable? = null) : WeConnectException

A data retrieval call returned a non-success status.

Link copied to clipboard
class TooManyRequestsError(val retryAfterSeconds: Int? = null, cause: Throwable? = null) : WeConnectException

HTTP 429 -- the BFF API rate limit was exceeded.

Properties

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
Link copied to clipboard
open val message: String?
Link copied to clipboard
Link copied to clipboard