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 arrayView on GitHub (pinned to 5ac6606e81)
Solutions
- Read the suffix: 'not found' → verify the dataset name and the project/workspace your `LANGSMITH_API_KEY` belongs to.
- 401/403 in the suffix → rotate/re-grant the key; confirm it has access to the target project.
- 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
- Before the run, do a cheap `lsClient.readDataset({datasetName})` existence check so the failure points at access, not at the eval flow.
- Keep the API key's project scope documented so operators use a key that can read the target dataset.
- Distinguish 'not found' from 'transient' in your catch so retries only apply to the latter.
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
- LangSmith mode requires `--dataset` and does not support `--
- LangSmith client not initialized - check LANGSMITH_API_KEY
- No examples found in dataset "${datasetName}"
- No prompt found in inputs - expected "prompt" string or "mes
- LangSmith mode requires dataset to be a dataset name string
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/309fbab8e46c37c9.
Report an issue: GitHub.