Use case
When writing validators and root validators it is useful to keep error formats consistent with the Pydantic TypeErrors and ValueErrors from the Pydantic errors module
Due to how Pydantic is packaged, these errors are not exported by https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/aws_lambda_powertools/utilities/parser/pydantic.py#L5
https://awslabs.github.io/aws-lambda-powertools-python/2.1.0/utilities/parser/#data-model-validation
Solution/User Experience
re-export the LPT packaged Pydantic errors module under from aws_lambda_powertools.utilities.parser.pydantic.errors
ensure this will still work smoothly after switch to rust / pydantic core
Alternative solutions
No response
Acknowledgment
Use case
When writing validators and root validators it is useful to keep error formats consistent with the Pydantic
TypeErrors andValueErrors from the Pydantic errors moduleDue to how Pydantic is packaged, these errors are not exported by https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/aws_lambda_powertools/utilities/parser/pydantic.py#L5
https://awslabs.github.io/aws-lambda-powertools-python/2.1.0/utilities/parser/#data-model-validation
Solution/User Experience
re-export the LPT packaged Pydantic errors module under
from aws_lambda_powertools.utilities.parser.pydantic.errorsensure this will still work smoothly after switch to rust / pydantic core
Alternative solutions
No response
Acknowledgment