{"record":{"id":"2d9d1fd35b2e5eee","repo":"vercel/turborepo","slug":"unknown-error","errorCode":"UNKNOWN_ERROR","errorMessage":"UNKNOWN_ERROR","messagePattern":"UNKNOWN_ERROR","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/turbo-ignore/src/errors.ts","lineNumber":49,"sourceCode":"export function shouldWarn({ err }: { err: string }): {\n  level: \"warn\" | \"error\";\n  message: string;\n  code: NonFatalErrorKey | \"UNKNOWN_ERROR\";\n} {\n  const knownError = Object.keys(NON_FATAL_ERRORS).find((key) => {\n    const { regex } = NON_FATAL_ERRORS[key as NonFatalErrorKey];\n    return regex.some((r) => r.test(err));\n  });\n\n  if (knownError) {\n    return {\n      level: \"warn\",\n      message: NON_FATAL_ERRORS[knownError as NonFatalErrorKey].message,\n      code: knownError as NonFatalErrorKey\n    };\n  }\n\n  return { level: \"error\", message: err, code: \"UNKNOWN_ERROR\" };\n}\n","sourceCodeStart":31,"sourceCodeEnd":51,"githubUrl":"https://github.com/vercel/turborepo/blob/f9245100cf0d31d96628804ead485f6bf226e55a/packages/turbo-ignore/src/errors.ts#L31-L51","documentation":"turbo-ignore spawns `turbo run ...` as a child process and classifies its stderr against the NON_FATAL_ERRORS table (missing lockfile, no package manager detected, unreachable parent commit, invalid ref/comparison). When no regex matches, shouldWarn() returns level \"error\", passes the raw message through unchanged, and labels it UNKNOWN_ERROR — it is the default bucket for unclassified failures, not a specific error itself.","triggerScenarios":"Any underlying turbo failure whose wording falls outside the four known patterns: invalid turbo.json, task-graph errors, network or OOM failures, git errors worded differently than the regexes expect, or a turbo version whose messages have drifted from turbo-ignore's patterns.","commonSituations":"Build platforms (e.g. Vercel) invoking turbo-ignore against a locally pinned turbo with different error text; genuinely broken turbo.json; shallow clones with insufficient git history producing unanticipated message shapes.","solutions":["Read the passthrough message — it is the authoritative error text from turbo","Reproduce locally by running the same `turbo run <task>` command the integration executes","Fix the underlying turbo failure (config, lockfile, git state)","Align versions: upgrade turbo and turbo-ignore together so the known-error patterns match"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Preflight: reproduce the exact command turbo-ignore will run\nimport { execSync } from \"node:child_process\";\ntry {\n  execSync(`turbo run ${task} --dry=json`, { stdio: \"pipe\" });\n} catch (e) {\n  // fix whatever turbo reports here BEFORE wiring turbo-ignore in\n}","typeGuard":"function isUnknownTurboIgnoreError(r: { code: string; level: string }): boolean {\n  return r.code === \"UNKNOWN_ERROR\" && r.level === \"error\";\n}","tryCatchPattern":"const result = shouldWarn({ err: stderr });\nif (isUnknownTurboIgnoreError(result)) {\n  // the message is the raw turbo stderr — treat it as authoritative,\n  // fail the build/log it, and reproduce locally with the same turbo run\n}","preventionTips":["Keep turbo and turbo-ignore versions in lockstep so known-error regexes match","Commit a lockfile and valid turbo.json so turbo itself succeeds","Test the turbo-ignore invocation in CI before relying on it in build infrastructure"],"tags":["turbo-ignore","classification","stderr","fallback"],"backgroundTag":"unknown-error-classification","analyzedSha":"f9245100cf0d31d96628804ead485f6bf226e55a","analyzedAt":"2026-08-17T10:46:15.696Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}