Skip to content

Type Alias: OsfqlErrorType

@kortexya/reasoninglayer


@kortexya/reasoninglayer / OsfqlErrorType

OsfqlErrorType = "parse" | "compile" | "execution" | "row_cap" | "refused" | "lock_timeout"

Defined in: src/types/osfql.ts:1002

The class of an OSFQL failure, as POST /api/v1/osfql and POST /api/v1/osfql/preview report it in error_type.

  • parse (HTTP 400) — the program text does not parse.
  • compile (HTTP 400) — it parses and does not compile.
  • execution (HTTP 422) — it failed while running, including an ALTER SORT whose subject sort is unknown. A write refusal carries OsfqlRefusal beside it. A DROP SORT / ALTER SORT … PARENTS that fails for a reason other than a refusal answers the status of its REST route.
  • row_cap (HTTP 422) — one candidate-set materialisation outgrew the request’s maxRows. Nothing was written. Repair it with a LIMIT, a narrower pattern, or a larger maxRows.
  • refused (HTTP 400 / 404 / 409) — a program refused before it ran because a DROP SORT / ALTER SORT … PARENTS is not alone (OsfqlFailure.atomicRefusal, HTTP 400); an ALTER SORT … PARENTS naming an unknown or foreign parent (HTTP 400); a DROP SORT the guarded sort delete refused (sortDeleteRefusal); or a move the engine refused.
  • lock_timeout (HTTP 503) — other writers kept the tenant’s knowledge base locked until the request deadline, and nothing ran. Only POST /api/v1/osfql answers it (also before a read-only MATCH, when the ruleset rebuild cannot get the lattice in time); the preview never does. Retry it as is, or send a larger timeoutMs.

The seventh wire value, timeout (HTTP 504), is not an OsfqlError: the SDK throws DeadlineExceededError for it, the same class every other route’s deadline throws.

const kind: OsfqlErrorType = 'row_cap';