Reference / @getenginex/sdk/extension / Attempts
Attempts
Attempt of an idempotent write: the Idempotency-Key is only reused after an ambiguous failure (the operation may have reached the gateway), and only for the same input. For SDK packages and adapters (via @getenginex/sdk/extension), not for apps.
Methods
keyFor()
keyFor(
input):string|undefined
Key for the call with this input: that of the open attempt, if the fingerprint is the same; otherwise a new one, which becomes the open attempt. undefined for an input without a fingerprint (the transport generates a key per call).
Parameters
input
unknown
Returns
string | undefined
Throws
CONFIGURATION_ERROR if the environment has no Web Crypto to generate the key.
settle()
settle(
input,error?):void
Closes the call: with an ambiguous error (isAmbiguousFailure) the attempt stays open; success or any other error discards it. An ABORTED may have reached the gateway: whoever cancels and wants to retry passes idempotencyKey.
Parameters
input
unknown
error?
unknown
Returns
void