Skip to content

Commit 592cd56

Browse files
committed
docs: add a note that decorator will replace the event
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
1 parent eeabc0f commit 592cd56

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/content/utilities/parser.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ Use the decorator for fail fast scenarios where you want your Lambda function to
5858

5959
`event_parser` decorator will throw a `ValidationError` if your event cannot be parsed according to the model.
6060

61+
> NOTE: **This decorator will replace the `event` object with the parsed model if successful**. This means you might be careful when nesting other decorators that expect `event` to be a `dict`.
62+
6163
```python:title=event_parser_decorator.py
6264
from aws_lambda_powertools.utilities.parser import event_parser, BaseModel, ValidationError
6365
from aws_lambda_powertools.utilities.typing import LambdaContext

0 commit comments

Comments
 (0)