-
Notifications
You must be signed in to change notification settings - Fork 420
Bug: response hook is not called when idempotent function returns None
#5150
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
Labels
Comments
This was referenced Sep 10, 2024
Working on this and will release in the next release day. |
7 tasks
7 tasks
|
This is now released under 3.1.0 version! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behaviour
When working with the Idempotency utility, I am able to specify a response hook that should be run on every idempotent request. This allows me to modify the response before it's returned.
Current Behaviour
Currently the response hook is not called, even on idempotent requests, when the data attribute is
None
(coerced to"null"
in DynamoDB).Having an idempotent function without return is a valid use case for all those customers who want to discard the response or those who don't have control over the return of a function being made idempotent.
Code snippet
Possible Solution
No response
Steps to Reproduce
Run the function twice with the following payload:
and observe that the log within
my_response_hook
is never called on subsequent requests, which are idempotent.Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.12
Packaging format used
PyPi
Debugging logs
The text was updated successfully, but these errors were encountered: