Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
leandrodamascena opened this issue Mar 20, 2025 · 2 comments · Fixed by #6325
Assignees
Labels
bug Something isn't working idempotency Idempotency utility

Comments

@leandrodamascena
Copy link
Contributor

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

@leandrodamascena leandrodamascena added bug Something isn't working triage Pending triage from maintainers labels Mar 20, 2025
@leandrodamascena leandrodamascena self-assigned this Mar 20, 2025
@leandrodamascena leandrodamascena added idempotency Idempotency utility and removed triage Pending triage from maintainers labels Mar 20, 2025
@leandrodamascena leandrodamascena moved this from Triage to Working on it in Powertools for AWS Lambda (Python) Mar 20, 2025
@github-project-automation github-project-automation bot moved this from Working on it to Coming soon in Powertools for AWS Lambda (Python) Mar 24, 2025
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

@github-actions github-actions bot added the pending-release Fix or implementation already in dev waiting to be released label Mar 24, 2025
Copy link
Contributor

This is now released under 3.9.0 version!

@github-actions github-actions bot removed the pending-release Fix or implementation already in dev waiting to be released label Mar 25, 2025
@leandrodamascena leandrodamascena moved this from Coming soon to Shipped in Powertools for AWS Lambda (Python) Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working idempotency Idempotency utility
Projects
Status: Shipped
1 participant