is_lighter_unauthorized_exception
Documentation for eth_defi.lighter.sdk.is_lighter_unauthorized_exception function.
- is_lighter_unauthorized_exception(error)
Return whether an SDK exception indicates an expired or rejected token.
Lighter SDK releases have exposed the HTTP status as either
statusorstatus_codeand useUnauthorizedExceptionfor the generated error type. Checking these representations keeps this adapter independent of a particular SDK release while avoiding a hard dependency on the optionallighterpackage.- Parameters
error (BaseException) – Exception raised by an authenticated SDK operation.
- Returns
Truefor a Lighter HTTP 401 orUnauthorizedException.- Return type