Skip to content

Type Alias: ApiErrorCode

type ApiErrorCode =
| "db_not_found"
| "schema_unavailable"
| "db_misconfigured"
| "db_unreachable"
| "sql_rejected"
| "llm_failed"
| "rate_limited"
| "unauthorized"
| "auth_unavailable"
| "invalid_json"
| "goal_required"
| "goal_too_long"
| "invalid_scope"
| "dbId_required"
| "invalid_body"
| "invalid_email"
| "secret_unconfigured"
| "unconfigured"
| "internal_error"
| "key_not_found"
| "challenge_required"
| "auth_required"
| "account_required"
| "byollm_requires_session"
| "schema_mismatch"
| "write_constraint"
| "invalid_value"
| "write_no_rows"
| "ambiguous_db"
| "clarify_required"
| "write_no_rows"
| "write_constraint"
| "forbidden"
| "sql_required"
| "sql_too_long"
| "db_required"
| "invalid_engine"
| "invalid_model"
| "model_unavailable"
| "invalid_byollm_key"
| "byollm_unavailable"
| "wrong_preset"
| "connect_requires_account"
| "invalid_request"
| "introspection_failed"
| "sealing_unconfigured"
| "oauth_not_configured"
| "pick_expired"
| "import_not_found"
| "import_busy"
| "unknown_pack"
| "source_required"
| "invalid_preset"
| "preset_disabled"
| "preset_engine_conflict"
| "provision_failed"
| "create_requires_session"
| "invalid_bearer"
| "invalid_token"
| "token_taken"
| "adopt_failed"
| "unknown_error"
| "non_json_response"
| "network_error"
| "aborted"
| string & object;

Defined in: packages/sdk/src/index.ts:318

The wire’s error.code values. Kept literal-for-literal in step with the @nlqdb/errors registry (SK-ERR-001) — a compile-time guard in packages/errors/test/sdk-parity.test.ts fails the build if either side gains a code the other lacks. Still open-ended via (string & {}) so a newer API than the installed SDK doesn’t break consumer compiles.