{"record":{"id":"7764cdb96b993382","repo":"vercel/turborepo","slug":"iserrorlike-reason-reason-message-string-reas","errorCode":null,"errorMessage":"isErrorLike(reason) ? reason.message : String(reason)","messagePattern":"isErrorLike\\(reason\\) \\? reason\\.message : String\\(reason\\)","errorType":"exception","errorClass":"DownloadError","httpStatus":null,"severity":"error","filePath":"packages/turbo-utils/src/create-project.ts","lineNumber":214,"sourceCode":"      } catch {\n        // ignore\n      }\n\n      if (packageJsonContent) {\n        // read the scripts from the package.json\n        availableScripts.push(...Object.keys(packageJsonContent.scripts || {}));\n      }\n    }\n\n    let cdPath: string = appPath;\n    if (path.join(originalDirectory, appName) === appPath) {\n      cdPath = appName;\n    }\n\n    return { cdPath, hasPackageJson, availableScripts, repoInfo };\n  } catch (reason) {\n    loader.stop();\n    throw new DownloadError(\n      isErrorLike(reason) ? reason.message : String(reason)\n    );\n  }\n}\n","sourceCodeStart":196,"sourceCodeEnd":219,"githubUrl":"https://github.com/vercel/turborepo/blob/9f94a7d215b3881942527dd526afa3fc650869d5/packages/turbo-utils/src/create-project.ts#L196-L219","documentation":"createProject() in @turbo/utils (the create-turbo project creation flow) wraps its entire download-and-extract phase in try/catch and rethrows any failure as a DownloadError, setting the message from the original error via isErrorLike(). It is a wrapper error: the message can be a network failure text, an HTTP status, 'Invalid example name: ...', or a tar extraction error.","triggerScenarios":"Any exception during the download phase: downloadAndExtractExample/downloadAndExtractRepo failing (offline, proxy blocking codeload.github.com or github.com, 404 for a bad example/repo), an invalid example name, abort due to download timeout, or tar extraction/write errors.","commonSituations":"Corporate proxy or VPN blocking GitHub downloads; typo in the example name or repo shorthand (owner/repo#branch); flaky networks in CI; disk full during extraction.","solutions":["Read the wrapped message — it names the real failure; fix that root cause first (connectivity, example/repo name)","Verify the example name matches a directory under github.com/vercel/turborepo/examples, or that the repo shorthand owner/repo and branch are correct","If behind a proxy, configure HTTPS_PROXY/git proxy settings or download the example manually","Retry once after fixing connectivity; note createProject already retries downloads 3 times, so persistent failures are not transient"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":"import { DownloadError } from \"@turbo/utils/create-project\";\n\nfunction isDownloadError(e: unknown): e is DownloadError {\n  return e instanceof DownloadError; // class is `export class DownloadError extends Error {}`\n}","tryCatchPattern":"import { retry } from \"@turbo/utils\";\n\ntry {\n  await retry(() => createProject({ ... }), { retries: 3 });\n} catch (e) {\n  if (e instanceof DownloadError) {\n    // inspect e.message — it carries the underlying failure text\n  } else throw e;\n}","preventionTips":["Validate example/repo names before invoking creation flows","Wrap creation in retry with backoff; downloads are the flakiest step","Surface the wrapped message to users rather than the generic DownloadError name"],"tags":["network","download","scaffolding","create-turbo"],"backgroundTag":"download-failed","analyzedSha":"9f94a7d215b3881942527dd526afa3fc650869d5","analyzedAt":"2026-08-16T19:47:29.531Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}