We Connect Exception
Sealed exception hierarchy for all recoverable errors thrown by the library.
Catch specific subtypes to handle different failure modes:
AuthenticationError -- credentials rejected or session expired
RetrievalError -- data fetch failed (vehicle list, status, trips, etc.)
ControlError -- a vehicle command was rejected
TooManyRequestsError -- HTTP 429 rate limit hit
ApiError -- generic non-success HTTP response
Inheritors
Types
Link copied to clipboard
Login failed, token refresh failed, or session cannot be renewed.
Link copied to clipboard
A vehicle command was rejected by the BFF API.
Link copied to clipboard
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.