code, never on message. A code is a wallet.* code from the frame, an API error code forwarded verbatim, or a code this package produced locally.
Example
Properties
string
Documentation for this code, when the failure carried one.
string
Present when the failure originated at the Endstate API. Quote it in support
requests.
Record<string, unknown>
Structured context attached to the failure, when the wallet or API supplied
it.
Codes
code comes from three places. Frame wallet.* codes and Endstate API codes pass through verbatim; the package also produces a handful of codes locally:
frame
The session lapsed. Call
refreshSession() to establish a
fresh one.local
No response within the wait budget. The frame handshake, identity issuance,
session establishment, or wallet setup exceeded its
timeouts budget.local
destroy() settled this call. The wallet was torn down while the request was
pending.local
The wallet frame does not speak the bridge protocol version this package
sends. Upgrade
@endstate-sdk/web. details.supported lists the versions the
frame offered.local
The wallet’s reply could not be used - for example, a session reported without
an account address, or a failure that carried no usable
code.wallet.* codes and API error codes (for example a rejected credential) pass through unchanged. Always match on the exact string, and treat an unrecognized code as a generic failure rather than assuming a fixed set.
