Skip to main content
Every error thrown by @vibefollow/sdk extends VibeFollowError. Narrow to a subclass for typed recovery.

Worked example

Auto-retries (with exponential backoff plus jitter) are applied on NetworkError, ServerError, and RateLimitError. Non-retryable errors throw on the first failure. The retry budget is maxRetries + 1 total attempts (default 3 total).

Error reference

Base class. Catch this to handle every SDK error uniformly.
The API key is missing, malformed, or revoked. Not retryable — this is a configuration problem on your side.
Recovery example
Check the env var. If it’s set and looks right, the key has probably been revoked — issue a new one in the dashboard.
The request body failed validation. .field names the offending field when the server is able to pinpoint it.
Recovery example
Fix the request shape. Common causes: required field missing, wrong type, value out of bounds.
You’ve hit a rate limit. .retryAfterMs carries the server’s Retry-After (parsed to milliseconds). The SDK retries automatically up to maxRetries; the error is only thrown if retries are exhausted.
Recovery example
Wait retryAfterMs and try again, or batch your writes (vf.events.batch()).
Vibefollow had a problem. Retryable by definition; surfaced when retries are exhausted.
Recovery example
Check status.vibefollow.com if you’re seeing sustained ServerErrors. For single failures, the request can be safely retried later — the SDK’s Idempotency-Key prevents duplicates within a 24-hour window.
A network-layer failure: DNS, connection refused, timeout, aborted. Retryable.
Recovery example
Retry. The SDK does this automatically up to maxRetries; widen the budget if your environment is flaky.
HMAC mismatch, malformed X-Vibefollow-Signature header, or timestamp outside the ±5 minute window. Not retryable.
Recovery example
Return 401 to Vibefollow. Do not retry on your side; if the failure was transient, Vibefollow’s retry will pick it up. See Signature verification.