THE ORIONIS API
Build with clarity.
Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.
exception documentation
class ValidationException(Exception): (source)
Constructor: ValidationException(failures, message)
Carry structured schema-validation failures.
| Static Method | _summary |
Build the summary message reported alongside the field errors. |
| Method | __init__ |
Initialize field errors and a summary from validation failures. |
| Method | error |
Return the summary and structured field errors as a dictionary. |
| Instance Variable | errors |
Errors supplied through errors. |
| Instance Variable | failure |
Failure retained for propagation or reporting. |
| Instance Variable | failures |
Single failure or collected payload failures in reporting order. |
| Instance Variable | message |
Override the summary message reported to the client. |
Build the summary message reported alongside the field errors.
| Parameters | |
failures:tuple[orionis.schemas.entities.failure.ValidationFailure, ...] | Every failure collected for the payload. |
| Returns | |
str | First failure message, suffixed with the remaining error count. |
def __init__(self, failures:
ValidationFailure | Sequence[ ValidationFailure], message: str | None = None):
(source)
¶
Initialize field errors and a summary from validation failures.
| Parameters | |
failures:ValidationFailure or collections.abc.Sequence[ValidationFailure] | Single failure or collected payload failures in reporting order. |
message:str | None, optional | Override the summary message reported to the client. |
| Returns | |
None | No return value. |
Return the summary and structured field errors as a dictionary.
| Returns | |
dict | message summary and errors mapping each field to a list of {rule, message} objects. |