{"record":{"id":"309fbab8e46c37c9","repo":"n8n-io/n8n","slug":"dataset-datasetname-not-found-errormessage","errorCode":null,"errorMessage":"Dataset \"${datasetName}\" not found: ${errorMessage}","messagePattern":"Dataset \"(.+?)\" not found: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/ai-workflow-builder.ee/evaluations/harness/runner.ts","lineNumber":443,"sourceCode":"\t\t\t: `Loading up to ${maxExamples} examples from dataset \"${datasetName}\"...`,\n\t);\n\n\ttry {\n\t\treturn await loadExamplesFromDataset({\n\t\t\tlsClient,\n\t\t\tdatasetName,\n\t\t\tmaxExamples,\n\t\t\tfilters,\n\t\t});\n\t} catch (error) {\n\t\tconst errorMessage = error instanceof Error ? error.message : String(error);\n\t\tif (\n\t\t\terrorMessage.startsWith('No examples matched filters') ||\n\t\t\terrorMessage.startsWith('No examples found in dataset')\n\t\t) {\n\t\t\tthrow error instanceof Error ? error : new Error(errorMessage);\n\t\t}\n\t\tthrow new Error(`Dataset \"${datasetName}\" not found: ${errorMessage}`);\n\t}\n}\n\nfunction extractContextFromLangsmithInputs(inputs: unknown): TestCaseContext {\n\tconst record = asRecord(inputs);\n\tconst context: TestCaseContext = {};\n\n\tif (typeof record.dos === 'string') context.dos = record.dos;\n\tif (typeof record.donts === 'string') context.donts = record.donts;\n\n\t// Support both legacy referenceWorkflow (single) and referenceWorkflows (array) from dataset\n\tif (\n\t\tArray.isArray(record.referenceWorkflows) &&\n\t\trecord.referenceWorkflows.every((wf) => isSimpleWorkflow(wf))\n\t) {\n\t\tcontext.referenceWorkflows = record.referenceWorkflows;\n\t} else if (isSimpleWorkflow(record.referenceWorkflow)) {\n\t\t// Convert legacy single reference to array","sourceCodeStart":425,"sourceCodeEnd":461,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/ai-workflow-builder.ee/evaluations/harness/runner.ts#L425-L461","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\n// dataset name typo\nrun --backend langsmith --dataset My-Eval-Dataset\nError: Dataset \"My-Eval-Dataset\" not found: ... not found\n// after\nrun --backend langsmith --dataset my-eval-dataset","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  return await resolveAndEnrichLangsmithData({ dataset, langsmithOptions, lsClient, logger });\n} catch (e) {\n  const msg = e instanceof Error ? e.message : String(e);\n  if (msg.startsWith('Dataset \"') && msg.includes('not found')) {\n    // dataset missing or inaccessible — surface actionable guidance\n    throw new Error(`LangSmith dataset \"${dataset}\" not accessible: verify name and API-key project scope`);\n  }\n  if (/429|5\\d\\d|ETIMEDOUT|ENOTFOUND/.test(msg)) {\n    // transient — bounded retry is reasonable\n    await backoffRetry(() => resolveAndEnrichLangsmithData({ dataset, langsmithOptions, lsClient, logger }), { tries: 3 });\n    return;\n  }\n  throw e;\n}","preventionTips":["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."],"tags":["langsmith","dataset","network","configuration"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}