chroma-core/chroma · error · Error

Failed to generate jina embedding data.

Error message

Failed to generate jina embedding data.

What it means

Response-shape guard in generate(): the Jina API call succeeded but the parsed JSON lacks a `data` array — usually an API error payload (auth, rate limit, invalid model) returned with 200-family handling not checked before this point.

Solutions

  1. Log the full response body to see the API's error field
  2. Verify the Jina API key and model name
  3. Check response.status before parsing and surface non-OK statuses
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at clients/new-js/packages/ai-embeddings/jina/src/index.ts:123 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16). Data as JSON: /api/errors/b4dc8d8af505fc17. Report an issue: GitHub.

Appendix: source

Thrown at clients/new-js/packages/ai-embeddings/jina/src/index.ts:123

      model: this.modelName,
      task: this.task,
      lateChunking: this.lateChunking,
      truncate: this.truncate,
      dimensions: this.dimensions,
      normalized: this.normalized,
      embeddingType: this.embeddingType,
    };

    try {
      const response = await fetch(this.url, {
        method: "POST",
        headers: this.headers,
        body: JSON.stringify(snakeCase(body)),
      });

      const data = (await response.json()) as JinaEmbeddingsResponse;
      if (!data || !data.data) {
        throw new Error("Failed to generate jina embedding data.");
      }
      return data.data.map((result) => result.embedding);
    } catch (error) {
      if (error instanceof Error) {
        throw new Error(`Error calling Jina AI API: ${error.message}`);
      } else {
        throw new Error(`Error calling Jina AI API: ${error}`);
      }
    }
  }

  public defaultSpace(): EmbeddingFunctionSpace {
    return "cosine";
  }

  public supportedSpaces(): EmbeddingFunctionSpace[] {
    return ["cosine", "l2", "ip"];
  }

View on GitHub (pinned to aecdd12c8a)