-
Notifications
You must be signed in to change notification settings - Fork 421
Bug: process_partial_response or processor does not catch raised errors in subroutine #4349
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
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hey @mhboon, that's the expected behaviour when all records in the batch fail to be processed. https://docs.powertools.aws.dev/lambda/python/latest/utilities/batch/#partial-failure-mechanics If you however have a partial failure, that is one successful amongst many failures, then it won't raise. We do raise in total failure scenarios with all exceptions collected to help you diagnose an unwanted scenario. For poison pills, partial failures, etc. we handle just as fine. Does that help? Or did you notice a regression and an exception is being raised despite a partial success? |
Got it; in that case, I misunderstood and will close the issue. Thanks for clarifying. |
|
Expected Behaviour
Inline with the provided examples:
https://docs.powertools.aws.dev/lambda/python/latest/utilities/batch/#accessing-processed-messages and https://docs.powertools.aws.dev/lambda/python/latest/utilities/batch/#recommended
the expected behavior is that in case record_handler raises and exception. either processor or process_partial_response catches this for further controlled handling.
Current Behaviour
In case record_handler raises an exception, this results in a BatchProcessingError
Code snippet
Possible Solution
No response
Steps to Reproduce
Not yet tested when running in a lambda; reproduced when running locally.
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.8
Packaging format used
Lambda Layers
Debugging logs
No response
The text was updated successfully, but these errors were encountered: