Documentation Index
Fetch the complete documentation index at: https://docs.lasscyber.com/llms.txt
Use this file to discover all available pages before exploring further.
| |
|---|
| HTTP status | 422 Unprocessable Entity |
| Code | validation_error |
| Retry? | No — fix the request and re-issue. |
When this happens
The request matched the route but the body or query parameters failed
schema validation. Examples:
- A required field is missing.
- A field has the wrong type.
- An enum field has a value not in the allowed set.
- A numeric field is out of range.
limit exceeds the per-endpoint cap (see
Pagination).
Example response
For a missing required field:
{
"detail": [
{
"loc": ["body", "policy_slug"],
"msg": "Field required",
"type": "missing"
}
],
"code": "validation_error",
"request_id": "5b3f6c7e-7d24-4d40-9b12-3a59c01c6e91",
"doc_url": "https://docs.lasscyber.com/errors/validation_error"
}
detail is an array of items, each shaped
{ loc, msg, type }:
| Field | Meaning |
|---|
loc | Path to the offending field. body.policy_slug means the JSON body’s top-level policy_slug. |
msg | Human-readable message. |
type | Pydantic / FastAPI error type, e.g. missing, value_error, type_error.integer. |
How to fix
- Read the
loc of every item in detail.
- Compare with the auto-generated schema in the
API reference.
- Fix the request and re-send.
SDK behaviour
| SDK | Exception |
|---|
| Python | agnes.ValidationError with field_errors: dict[str, str] mapping dotted-path → message. |
| TypeScript | ValidationError with fieldErrors: Record<string, string>. |
Both SDKs walk the detail array for you so you can branch on
specific fields without re-parsing JSON.