Closed
Description
Expected Behavior
When looking at the logs, the cause
attribute of IdempotencyPersistenceLayerError
should include what actually went wrong.
Current Behavior
The cause
attribute of IdempotencyPersistenceLayerError
is undefined
Code snippet
const persistenceStore = new DynamoDBPersistenceLayer({
tableName: "Token.1234",
});
export const handler = makeIdempotent(handlerFunction, {
persistenceStore,
});
Steps to Reproduce
- Pass an invalid table name to
DynamoDBPersistenceLayer
such as"Token.1234"
- Trigger the lambda
- See
IdempotencyPersistenceLayerError
error in Cloudwatch logs missing thecause
attribute
Possible Solution
No response
Powertools for AWS Lambda (TypeScript) version
2.7.0
AWS Lambda function runtime
20.x
Packaging format used
npm
Execution logs
2024-08-12T06:04:28.165Z 1ecc73f4-1b73-4bf0-bf92-d8fd26a123d6 ERROR Invoke Error {
"errorType": "IdempotencyPersistenceLayerError",
"errorMessage": "Failed to save in progress record to idempotency store",
"name": "IdempotencyPersistenceLayerError",
"stack": [
"IdempotencyPersistenceLayerError: Failed to save in progress record to idempotency store",
" at #saveInProgressOrReturnExistingResult (/var/task/index.js:1459894:13)",
" at process.processTicksAndRejections (node:internal/process/task_queues:95:5)",
" at async IdempotencyHandler.handle (/var/task/index.js:1459814:42)"
]
}
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Shipped