bytedance/deer-flow · error

Unknown error

Error message

Unknown error

What it means

After httpPost succeeds at the HTTP level, generateChartUrl checks the chart service's application-level flag: a body of the shape {success: false, errorMessage} throws with errorMessage, and 'Unknown error' is the fallback when the service reports failure without an errorMessage field.

Source

Thrown at skills/public/chart-visualization/scripts/generate.js:73

    const text = await response.text();
    throw new Error(`HTTP ${response.status}: ${text}`);
  }

  return response.json();
}

async function generateChartUrl(chartType, options) {
  const url = getVisRequestServer();
  const payload = {
    type: chartType,
    source: "chart-visualization-creator",
    ...options,
  };

  const data = await httpPost(url, payload);

  if (!data.success) {
    throw new Error(data.errorMessage || "Unknown error");
  }

  return data.resultObj;
}

async function generateMap(tool, inputData) {
  const url = getVisRequestServer();
  const payload = {
    serviceId: getServiceIdentifier(),
    tool,
    input: inputData,
    source: "chart-visualization-creator",
  };

  const data = await httpPost(url, payload);

  if (!data.success) {
    throw new Error(data.errorMessage || "Unknown error");

View on GitHub (pinned to 1dd6ba1acb)

Solutions

  1. Log the full response body (not just errorMessage) to see why the service set success=false.
  2. Validate chartType against the service's supported types before calling; fix the spec generator's prompt/template if it emits bad types.
  3. If the service normally sends errorMessage but does not here, the failure is in its error path — check service logs/version.
  4. Pin or update the skill script to match the deployed chart service version.

Example fix

// before: failure reason lost when errorMessage is absent
if (!data.success) { throw new Error(data.errorMessage || 'Unknown error'); }

// after: include the payload context
if (!data.success) {
  throw new Error(`Chart generation failed (${chartType}): ${data.errorMessage || JSON.stringify(data).slice(0, 200)}`);
}
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED = new Set(['bar','line','pie','scatter', /* from service docs */]);
if (!SUPPORTED.has(chartType)) { throw new Error(`Unsupported chart type: ${chartType}`); }

Type guard

function isChartServiceSuccess(data: unknown): data is { success: true; resultObj: string } {
  return typeof data === "object" && data !== null && Reflect.get(data, "success") === true;
}

Try / catch

try { url = await generateChartUrl(type, opts); } catch (e) { if (e.message === 'Unknown error') { throw new Error(`Chart service rejected type '${type}' — see service docs`); } throw e; }

Prevention

When it happens

Trigger: The chart service returns 200 with success=false and no errorMessage — e.g. an unrecognized chart 'type', malformed option fields, or an internal service error that bypasses its error serializer. Map/vis service quota exhaustion can also return success=false.

Common situations: LLM-generated chart spec uses an unsupported type value or invalid option names; the hosted service silently degrades; version skew between the skill's payload format and the service.

Related errors


AI-assisted analysis of bytedance/deer-flow@1dd6ba1acb (2026-08-14). Data as JSON: /api/errors/68d9f529c2d2155c. Report an issue: GitHub.