splitch

DocsSDKfailures.md

Failure behavior.

Evaluation never throws and never hides. Peek throws.

A failure is always observable and never a silently disguised default. That is the whole contract; the shape it takes depends on the method.

evaluate, evaluateDetails, verify

These never throw and never retry. On any failure (HTTP error, timeout, network error, unparseable body) they return your defaultValue (or false when you gave none), log loudly through logger.error, and report reason: "ERROR" plus an errorCode in ResolutionDetails.

The default value is returned so your request path keeps serving, and the loud log plus the ERROR reason are what stop that from becoming a silent outage. If you only read the value, you cannot tell a resolved false from a fallback false: read reason when the difference matters.

peekVariant

Throws a SplitchSdkError carrying code, status, and docsUrl. Peek is an inspection call with no user path to keep serving, so failing loudly is the correct behavior rather than returning something plausible.

Reading the error

Every SplitchSdkError message is one line in a fixed shape, and every code resolves to a page:

UNAUTHORIZED: Cause: <what happened>. Remediation: <what to do>. Docs: https://splitch.dev/docs/error/UNAUTHORIZED

The full catalog is at /docs/error, and the machine-readable index is at /llms.txt.