Reference / @getenginex/sdk/extension / createAttempts
createAttempts()
createAttempts():
Attempts
Creates the attempt of an idempotent write (at most one open). One per mutation options object (plain TanStack, Vue, vanilla) or per hook instance (sdk-react).
Returns
Example
ts
const attempts = createAttempts()
const key = attempts.keyFor(input)
try { const r = await call(input, { idempotencyKey: key }); attempts.settle(input); return r }
catch (error) { attempts.settle(input, error); throw error }Throws
Never throws; keyFor may throw CONFIGURATION_ERROR without Web Crypto.