Skip to content

Type Alias: AttributeExplorationErrorCode

@kortexya/reasoninglayer


@kortexya/reasoninglayer / AttributeExplorationErrorCode

AttributeExplorationErrorCode = "exploration_question_not_pending" | "idempotency_key_reused" | "exploration_actor_required" | "exploration_sources_changed" | "exploration_session_completed" | "exploration_session_not_completed" | "exploration_not_published" | "exploration_publication_unavailable"

Defined in: src/types/analysis.ts:578

A coded refusal of the attribute-exploration routes, read with errorBodyCode.

  • exploration_question_not_pending (409) — the confirm or refute named a question that is not the session’s pending one: a replay, a stale id, or an id sent after the exploration completed. Nothing was applied. Re-read the pending question with getExplorationStatus.
  • idempotency_key_reused (409) — an idempotencyKey already committed a different confirm, refute or advance request. Nothing was applied.
  • exploration_session_completed (409) — advance on a completed session.
  • exploration_sources_changed (409) — completion found the session’s source records changed since the exploration read them.
  • exploration_session_not_completed / exploration_not_published (409) — a sort licence needs a completed exploration with a recorded publication to extend.
  • exploration_actor_required (403) — the route needs a gateway human actor.
  • exploration_publication_unavailable (503) — the authoritative snapshot or the atomic commit was unavailable; nothing was installed.

A 409 is thrown as a ConstraintViolationError (the SDK maps every 409 to it), a 403 as a ForbiddenError, a 400 as a BadRequestError and a 503 as a ServiceUnavailableError; branch on the code, not on the class name.

const code: AttributeExplorationErrorCode = 'exploration_question_not_pending';