Error shapes (RichError-compatible)
Request validation failure → 400 with all part issues collected:
{
"statusCode": 400,
"message": "Request validation failed",
"code": "VALIDATION_ERROR",
"errors": {
"path.id": ["Too small: expected string to have >=1 characters"],
"body.name": ["Too small: expected string to have >=2 characters"]
}
}On the frontend, RichError picks up message, code, and errors automatically — field errors from the backend arrive typed and addressable.
Response contract violation → 500 with code: "RESPONSE_CONTRACT_VIOLATION". Issues are always logged server-side; include them in the body during development with exposeResponseErrors: true.