diegosouzapw/OmniRoute · error
VALID_002
VALID_002
Error message
Missing required field
What it means
Canonical error-code entry VALID_002 (HTTP 400, VALIDATION category): the body parsed but is missing a field the schema marks required. Companion of VALID_001 — use this when the payload is structurally valid JSON yet incomplete.
Solutions
- Add the missing required field listed in the error detail
- Check for typos/casing in field names
- Consult the endpoint schema for required vs optional keys
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/shared/constants/errorCodes.ts:135 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/7469a77bc88cc7ef.
Report an issue: GitHub.
Appendix: source
Thrown at src/shared/constants/errorCodes.ts:135
httpStatus: 504,
category: "PROVIDER",
},
PROVIDER_003: {
code: "PROVIDER_003",
message: "Provider not configured",
httpStatus: 400,
category: "PROVIDER",
},
// ── Validation ──
VALID_001: {
code: "VALID_001",
message: "Invalid request body",
httpStatus: 400,
category: "VALIDATION",
},
VALID_002: {
code: "VALID_002",
message: "Missing required field",
httpStatus: 400,
category: "VALIDATION",
},
VALID_003: {
code: "VALID_003",
message: "Input sanitization blocked",
httpStatus: 400,
category: "VALIDATION",
},
// ── Combos (T-22.b — 400-shape standardization for /api/combos/{id}) ──
COMBO_001: {
code: "COMBO_001",
message: "Request body is not valid JSON",
httpStatus: 400,
category: "COMBO",
},View on GitHub (pinned to a179ffed5b)