Documentation
    Preparing search index...

    Variable API_ERROR_CODESConst

    API_ERROR_CODES: readonly [
        "invalid_request",
        "unauthorized",
        "path_not_watched",
        "not_found",
        "source_not_indexed",
        "source_not_found",
        "unsupported_content_type",
        "pipeline_error",
        "source_unavailable",
        "not_available",
        "scan_in_progress",
        "embedding_unavailable",
        "internal_error",
    ] = ...

    Every machine-readable code a non-2xx response can carry, in one list. Codes are stable: new codes may be added, existing ones never change meaning. The usual HTTP status is in API_ERROR_STATUS.

    • invalid_request (400): the body, query or parameters failed validation (details holds the Zod issues when available), or the framework rejected the request (malformed JSON, unsupported media type, body too large).
    • unauthorized (401): api.apiKey is set and the bearer token is missing or wrong.
    • path_not_watched (403): the file path is outside the watched scope.
    • not_found (404): no such route, file, VCS root, commit content or .gitignore entry.
    • source_not_indexed (404): no stored point for the source reference, so no designated rule is known.
    • source_not_found (404): the source callback answered 404.
    • unsupported_content_type (422): the source callback returned a non-JSON body.
    • pipeline_error (422): rendering or extraction failed; for a source document issueType names the failing stage.
    • source_unavailable (502): the source callback failed.
    • not_available (503): the feature is not available on this instance (no source support, no filesystem watcher). A prune reindex (POST /reindex) without a vector store keeps its 0.19 status 400.
    • scan_in_progress (503): the initial filesystem scan is still running; retry later.
    • embedding_unavailable (503): the embedding provider's retry budget ran out; honour Retry-After.
    • internal_error (500): an unexpected server-side failure.