n8n-io/n8n · error · Error

Dataset "${datasetName}" not found: ${errorMessage}

Error message

Dataset "${datasetName}" not found: ${errorMessage}

What it means

Wrapper around LangSmith dataset resolution: any error from the underlying `readDataset`/`listExamples` flow that is NOT one of the 'No examples matched/found' messages is rethrown with the dataset name prepended. This is the catch-all for transport, auth, and 'dataset does not exist' failures — the original error message is preserved in the suffix.

Source

Thrown at packages/@n8n/ai-workflow-builder.ee/evaluations/harness/runner.ts:443

			: `Loading up to ${maxExamples} examples from dataset "${datasetName}"...`,
	);

	try {
		return await loadExamplesFromDataset({
			lsClient,
			datasetName,
			maxExamples,
			filters,
		});
	} catch (error) {
		const errorMessage = error instanceof Error ? error.message : String(error);
		if (
			errorMessage.startsWith('No examples matched filters') ||
			errorMessage.startsWith('No examples found in dataset')
		) {
			throw error instanceof Error ? error : new Error(errorMessage);
		}
		throw new Error(`Dataset "${datasetName}" not found: ${errorMessage}`);
	}
}

function extractContextFromLangsmithInputs(inputs: unknown): TestCaseContext {
	const record = asRecord(inputs);
	const context: TestCaseContext = {};

	if (typeof record.dos === 'string') context.dos = record.dos;
	if (typeof record.donts === 'string') context.donts = record.donts;

	// Support both legacy referenceWorkflow (single) and referenceWorkflows (array) from dataset
	if (
		Array.isArray(record.referenceWorkflows) &&
		record.referenceWorkflows.every((wf) => isSimpleWorkflow(wf))
	) {
		context.referenceWorkflows = record.referenceWorkflows;
	} else if (isSimpleWorkflow(record.referenceWorkflow)) {
		// Convert legacy single reference to array

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Read the suffix: 'not found' → verify the dataset name and the project/workspace your `LANGSMITH_API_KEY` belongs to.
  2. 401/403 in the suffix → rotate/re-grant the key; confirm it has access to the target project.
  3. Network/5xx in the suffix → retry; if persistent, check LangSmith status and SDK version.

Example fix

// before
// dataset name typo
run --backend langsmith --dataset My-Eval-Dataset
Error: Dataset "My-Eval-Dataset" not found: ... not found
// after
run --backend langsmith --dataset my-eval-dataset
Defensive patterns

Strategy: try-catch

Try / catch

try {
  return await resolveAndEnrichLangsmithData({ dataset, langsmithOptions, lsClient, logger });
} catch (e) {
  const msg = e instanceof Error ? e.message : String(e);
  if (msg.startsWith('Dataset "') && msg.includes('not found')) {
    // dataset missing or inaccessible — surface actionable guidance
    throw new Error(`LangSmith dataset "${dataset}" not accessible: verify name and API-key project scope`);
  }
  if (/429|5\d\d|ETIMEDOUT|ENOTFOUND/.test(msg)) {
    // transient — bounded retry is reasonable
    await backoffRetry(() => resolveAndEnrichLangsmithData({ dataset, langsmithOptions, lsClient, logger }), { tries: 3 });
    return;
  }
  throw e;
}

Prevention

When it happens

Trigger: LangSmith `readDataset({datasetName})` raises because the named dataset does not exist on the project; the API key lacks access; a network/timeout error during the call; or the client returned an unexpected response shape. The two 'No examples...' messages are deliberately let through unchanged.

Common situations: Typo in the dataset name; pointing at the right name in the wrong LangSmith project/org; rotated/revoked API key; transient LangSmith API outage; SDK version mismatch returning a different error shape.

Related errors


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/309fbab8e46c37c9. Report an issue: GitHub.