You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PydanticSerializer with the idempotent_function decorator should support an optional return or raise a clear error message (along with doc updates)
Current Behaviour
When using the PydanticSerializer with the idempotent_function decorator, if the return can be None( Optional or MyModel | None), the utility will throw an error.
Expected Behaviour
The
PydanticSerializer
with theidempotent_function
decorator should support an optional return or raise a clear error message (along with doc updates)Current Behaviour
When using the
PydanticSerializer
with theidempotent_function
decorator, if the return can beNone
(Optional
orMyModel | None
), the utility will throw an error.Code snippet
Possible Solution
Allow for optional returns (maybe check for this scenario) or raise an error message that explains this limitation (update docs too)
Steps to Reproduce
Use idempotent decorator with PydanticSerializer. Set return type to
Optional
orMyModel | None
.Powertools for AWS Lambda (Python) version
2.43
AWS Lambda function runtime
3.11
Packaging format used
PyPi
Debugging logs
The text was updated successfully, but these errors were encountered: