← Back to Documentation

Errors

Basivis rejects invalid requests deterministically. No guessing, no correction, no interpretation — every error is explicit, reproducible, and structurally enforced.

Error Model

Errors occur when a request violates structural or API‑level rules. Basivis does not modify, infer, or repair invalid input. All errors are deterministic and returned immediately.

API Error Codes

401 — Invalid or Missing Key

The x-basivis-key header is missing or incorrect.

{ "error": "Invalid or missing x-basivis-key." }

400 — Invalid JSON Body

The request body is not valid JSON or cannot be parsed.

{ "error": "Invalid JSON body." }

413 — Request Body Too Large

The request body exceeds the maximum allowed size (50kb).

{ "error": "Request body too large." }

429 — Rate Limit Exceeded

Too many requests from the same IP within one minute.

{ "error": "Rate limit exceeded." }

429 — Daily Request Limit Reached

The daily request quota for this IP has been reached.

{ "error": "Daily request limit exceeded." }

Field Error Codes

400 — Field Must Be a String

All fields must be deterministic strings. Arrays and numbers are rejected.

{ "error": "Field 'direction' must be a string." }

422 — Field Too Short

Each field must contain at least 10 characters.

{ "error": "Field 'elements' is too short." }

413 — Field Exceeds Maximum Length

A field exceeds the maximum allowed length (2000 characters).

{ "error": "Field 'constraints' exceeds maximum length." }

500 — Internal Structural Engine Error

An unexpected error occurred inside the structural engine.

{ "error": "Internal structural engine error." }