Skip to content

Bug: Incorrect error message for IdempotencyAlreadyInProgressError when sortKeyAttr is in use #6308

Closed
@leandrodamascena

Description

@leandrodamascena

Expected Behaviour

Original issue: aws-powertools/powertools-lambda-typescript#3691

When an IdempotencyAlreadyInProgressError is thrown, the error message should include the hashed key information.

Current Behaviour

Currently, the error message only includes the partition key, but when a sortKeyAttr has been provided in the config the partition key is a static string. The leads to meaningless errors in the log that all say there's a IdempotencyAlreadyInProgressError error for the same key.

Code snippet

no code

Possible Solution

Include both the pk/sk, or detect the current scenario better and include the more meaningful one.

Steps to Reproduce

use Idempotency with SK

Powertools for AWS Lambda (Python) version

latest

AWS Lambda function runtime

3.13

Packaging format used

Lambda Layers, Serverless Application Repository (SAR) App, PyPi

Debugging logs

Metadata

Metadata

Labels

bugSomething isn't workingidempotencyIdempotency utility

Type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions