{"record":{"id":"00292ee0eeed458f","repo":"JuliusBrussee/caveman","slug":"path-must-be-json-data-got-typeof-value","errorCode":null,"errorMessage":"${path} must be JSON data (got ${typeof value})","messagePattern":"(.+?) must be JSON data \\(got (.+?)\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/mastra/src/index.ts","lineNumber":755,"sourceCode":"    case \"string\":\n      return JSON.stringify(value);\n    case \"boolean\":\n      return value ? \"true\" : \"false\";\n    case \"number\":\n      if (!Number.isFinite(value)) throw new Error(`${path} must be a finite number`);\n      return JSON.stringify(value);\n    case \"object\": {\n      if (Array.isArray(value)) {\n        return `[${value.map((item, i) => stableStringify(item, `${path}[${i}]`)).join(\",\")}]`;\n      }\n      if (!isPlainObject(value)) throw new Error(`${path} must be a plain object, array, or primitive`);\n      const entries = Object.entries(value).sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0));\n      return `{${entries\n        .map(([key, item]) => `${JSON.stringify(key)}:${stableStringify(item, `${path}.${key}`)}`)\n        .join(\",\")}}`;\n    }\n    default:\n      throw new Error(`${path} must be JSON data (got ${typeof value})`);\n  }\n}\n\n// ---------------------------------------------------------------------------\n// 5. Deep links\n// ---------------------------------------------------------------------------\n\n/**\n * Mastra Studio's documented default address. The dev server listens on 4111\n * (or `PORT`): https://mastra.ai/docs/studio/overview\n */\nexport const MASTRA_STUDIO_DEFAULT_BASE_URL = \"http://localhost:4111\";\n\nexport interface MastraStudioLinkOptions {\n  /**\n   * REQUIRED. Mastra documents a Studio Observability tab but not a per-trace\n   * URL, so this package will not invent one. Supply the shape your Studio\n   * build uses, with `{traceId}` (and optionally `{baseUrl}`) placeholders —","sourceCodeStart":737,"sourceCodeEnd":773,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/packages/mastra/src/index.ts#L737-L773","documentation":"Error \"${path} must be JSON data (got ${typeof value})\" thrown in JuliusBrussee/caveman.","triggerScenarios":"Thrown at packages/mastra/src/index.ts:755 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass JSON-serializable data at the indicated path."],"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-15T22:17:37.221Z"}