Closed
Description
Use case
When writing validators and root validators it is useful to keep error formats consistent with the Pydantic TypeError
s and ValueError
s 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
- This feature request meets Lambda Powertools Tenets
- Should this be considered in other Lambda Powertools languages? i.e. Java, TypeScript