Custom error handler function for the schema. :param error: The `ValidationError` raised during (de)serialization. :param data: The original input data. :param many: Value of ``many`` on dump or load. :param partial: Value of ``partial`` on load. .. versionc
(
self, error: ValidationError, data: typing.Any, *, many: bool, **kwargs
)
| 484 | ##### Override-able methods ##### |
| 485 | |
| 486 | def handle_error( |
| 487 | self, error: ValidationError, data: typing.Any, *, many: bool, **kwargs |
| 488 | ): |
| 489 | """Custom error handler function for the schema. |
| 490 | |
| 491 | :param error: The `ValidationError` raised during (de)serialization. |
| 492 | :param data: The original input data. |
| 493 | :param many: Value of ``many`` on dump or load. |
| 494 | :param partial: Value of ``partial`` on load. |
| 495 | |
| 496 | .. versionchanged:: 3.0.0rc9 |
| 497 | Receives `many` and `partial` (on deserialization) as keyword arguments. |
| 498 | """ |
| 499 | |
| 500 | def get_attribute(self, obj: typing.Any, attr: str, default: typing.Any): |
| 501 | """Defines how to pull values from an object to serialize. |