Skip to content

Commit 1e440ff

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: docs/utilities/idempotency.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -271,13 +271,13 @@ The output serializer supports any JSON serializable data, **Python Dataclasses*
271271

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

274-
> **Payment scenario**
274+
> **Example scenario**
275275
276276
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.
277277

278278
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.
279279

280-
**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.
280+
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.
281281

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

0 commit comments

Comments
 (0)