Skip to content

Commit f795c2e

Browse files
committed
docs: move bold to draw attention to whole event as idempotency key
Signed-off-by: heitorlessa <[email protected]>
1 parent bb23ce9 commit f795c2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/utilities/idempotency.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,13 @@ By default, caching is disabled since we don't know how big your response could
278278

279279
Use [`IdempotencyConfig`](#customizing-the-default-behavior)'s **`event_key_jmespath`** parameter to select one or more payload parts as your idempotency key.
280280

281-
> **Payment scenario**
281+
> **Example scenario**
282282
283283
In this example, we have a Lambda handler that creates a payment for a user subscribing to a product. We want to ensure that we don't accidentally charge our customer by subscribing them more than once.
284284

285285
Imagine the function runs successfully, but the client never receives the response due to a connection issue. It is safe to immediately retry in this instance, as the idempotent decorator will return a previously saved response.
286286

287-
**We want** to use `user_id` and `product_id` fields as our idempotency key. If we were to treat the entire request as our idempotency key, a simple HTTP header change would cause our function to run again.
287+
We want to use `user_id` and `product_id` fields as our idempotency key. **If we were** to treat the entire request as our idempotency key, a simple HTTP header change would cause our function to run again.
288288

289289
???+ tip "Deserializing JSON strings in payloads for increased accuracy."
290290
The payload extracted by the `event_key_jmespath` is treated as a string by default.

0 commit comments

Comments
 (0)