{"record":{"id":"7685ff338b41410a","repo":"JuliusBrussee/caveman","slug":"label-is-required","errorCode":null,"errorMessage":"${label} is required","messagePattern":"(.+?) is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/mastra/src/index.ts","lineNumber":811,"sourceCode":" * The Caveman dashboard trace page: `{baseUrl}/traces/{traceId}?project_id=…`.\n *\n * The dashboard currently resolves the project from the workspace switcher and\n * ignores the query parameter; it is carried so the link is unambiguous about\n * which project's trace it means.\n */\nexport function cavemanTraceLink(baseUrl: string, projectId: string, traceId: string): string {\n  const base = requireBaseUrl(baseUrl, \"cavemanTraceLink: baseUrl\");\n  const project = requireNonEmpty(projectId, \"cavemanTraceLink: projectId\");\n  const trace = requireNonEmpty(traceId, \"cavemanTraceLink: traceId\");\n  return `${base}/traces/${encodeURIComponent(trace)}?project_id=${encodeURIComponent(project)}`;\n}\n\n// ---------------------------------------------------------------------------\n// Shared helpers\n// ---------------------------------------------------------------------------\n\nfunction requireNonEmpty(value: string | undefined, label: string): string {\n  if (typeof value !== \"string\" || value.trim() === \"\") throw new Error(`${label} is required`);\n  return value.trim();\n}\n\nfunction requireBaseUrl(value: string | undefined, label: string): string {\n  const raw = requireNonEmpty(value, label);\n  let parsed: URL;\n  try {\n    parsed = new URL(raw);\n  } catch {\n    throw new Error(`${label} must be an absolute http(s) URL`);\n  }\n  // Credentials ride every request to this host. Plain http is allowed only\n  // for loopback development targets — anywhere else the key or session token\n  // would transit unencrypted to a caller-chosen host.\n  const loopback = parsed.hostname === \"localhost\" || parsed.hostname === \"127.0.0.1\" || parsed.hostname === \"::1\" || parsed.hostname === \"[::1]\";\n  if (parsed.protocol === \"http:\" && !loopback) {\n    throw new Error(`${label} must use https (plain http is allowed only for localhost)`);\n  }","sourceCodeStart":793,"sourceCodeEnd":829,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/packages/mastra/src/index.ts#L793-L829","documentation":"Error \"${label} is required\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at packages/mastra/src/index.ts:811 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-empty value for the indicated field."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}