Every error your API returns looks the same, no matter what threw it.
Errium normalizes uncaught exceptions, HTTP exceptions and validation errors into one consistent, frontend-safe JSON response — across FastAPI, Flask, Django Ninja and Django REST Framework.
pip install errium The difference
The same failed request — a body missing its password field — before and after.
{
"detail": [
{
"type": "missing",
"loc": ["body", "password"],
"msg": "Field required",
"input": null
}
]
}What you get
Unified error format
Every API error response uses the exact same structured JSON contract, whatever threw it.
Validation beautifier
Nested Pydantic output collapses into a flat, readable map of field to message.
Trace IDs
A fresh identifier per error, so a client-facing response maps to a server-side log line.
Dev vs. prod mode
Tracebacks, exception names and hints in development; sealed internals in production.
Extensible classifiers
Register your own domain exceptions with priority-based resolution.