NexusInitError | NexusClient.create(), AsyncNexusClient.create() | The initial sync failed for any reason. The __cause__ attribute carries the underlying exception (often NexusUnauthorizedError or an httpx.HTTPError). |
NexusUnauthorizedError | sync(), evaluate_ab(), the write methods | Server returned HTTP 401 - invalid API key, slug/key mismatch, or revoked key. A rejected developer session names the westyx dev setup command. |
NexusBillingError | sync(), evaluate_ab(), the write methods | Server returned HTTP 402 - tenant has invoices overdue by more than 14 days. Background sync slows to one attempt every five minutes and any successful sync (a 304 included) restores it; the cache continues to serve throughout. Check client.billing_overdue. |
NexusQuarantinedError | sync(), evaluate_ab(), the write methods | Server returned HTTP 429 with {"error":"quarantined","reason":"...","expires_at":"..."}. Background sync is paused until expires_at, clamped to at most 24 hours ahead, and the on_quarantined observer callback fires. |
NexusRateLimitedError | sync(), evaluate_ab(), the write methods | Server returned HTTP 429 without a quarantine body - too many requests. Back off and retry. |
NexusNotFoundError | sync(), evaluate_ab(), the write methods | Server returned HTTP 404 - unknown subdomain or missing endpoint (or, for the delete methods, an unknown key or version). |
NexusPublicKeyError | get_secret(), the write methods | The client uses a public key. Raised synchronously, before the network call. |
NexusServiceKindMismatchError | get_secret() | The service kind reported by the server is "frontend". Frontend services must not hold secrets, regardless of key type. |
NexusSecretNotFoundError | get_secret() | The requested key is not in the cache. The key attribute carries the requested name. |
NexusAbAddonNotAvailableError | evaluate_ab() | Server returned HTTP 403 - the AB Testing add-on is not active for this tenant/service. |
NexusEnvironmentDisabledError | sync(), evaluate_ab(), the write methods; the token exchange (as the __cause__) | The project has switched the service’s environment off: HTTP 403 with {"error":"environment_disabled"}. A NexusApiError with status_code 403 and code "environment_disabled". The cache keeps serving; the background refresh and the stream wait five minutes between attempts, and the first successful sync clears it. |
NexusServiceLockedError | sync(), evaluate_ab(), the write methods; the token exchange (as the __cause__) | The service is in emergency lockdown: HTTP 423 with {"error":"service_locked"}. A NexusApiError with status_code 423 and code "service_locked". The cache keeps serving; the stream exits immediately (FALLBACK_REASON_SERVICE_LOCKED) and background sync retries halt until an explicit sync() succeeds after the lockdown is lifted. |
NexusApiError | sync(), evaluate_ab(), the write methods; the token exchange (as the __cause__) | Any other non-2xx status - for example 410 with code tenant_deleted. status_code, code (the response’s error field, or None) and operation say which; the message never carries the response body. |
NexusWIFNotConfiguredError | create(), any request that refreshes the session | WIF is enabled but no usable workload-identity credential matched, or the credential is gone (a removed token file, westyx dev teardown). Raised at once, without a request. |
NexusWIFTokenExchangeFailedError | create() | POST /v1/auth/token-exchange returned a non-2xx response, or the body could not be decoded. The __cause__ carries the API error. |
NexusSessionExpiredError | any request with WIF enabled | The session cannot authenticate the request and there is no static api_key: the server rejected it (401), or it expired and refreshing it failed - then the refresh error is the __cause__. Not raised for the developer provider, which names the renew command instead. |