{"record":{"id":"6100a2ee39c5f3e6","repo":"mastra-ai/mastra","slug":"new-observability-endpoints-require-mastra-core","errorCode":null,"errorMessage":"New observability endpoints require @mastra/core >= 1.13.2, please upgrade.","messagePattern":"New observability endpoints require @mastra/core >= 1\\.13\\.2, please upgrade\\.","errorType":"http","errorClass":"HTTPException","httpStatus":501,"severity":"error","filePath":"packages/server/src/server/handlers/observability-new-endpoints.ts","lineNumber":105,"sourceCode":"  config: {\n    pathParamSchema?: TPathSchema;\n    queryParamSchema?: TQuerySchema;\n    bodySchema?: TBodySchema;\n    responseSchema?: TResponseSchema;\n    handler: ServerRouteHandler<InferParams<TPathSchema, TQuerySchema, TBodySchema>>;\n  },\n) {\n  const { handler, ...schemas } = config;\n  return createRoute({\n    ...def,\n    ...schemas,\n    responseType: 'json' as const,\n    tags: ['Observability'],\n    requiresAuth: true,\n    handler: (async (params: InferParams<TPathSchema, TQuerySchema, TBodySchema> & ServerContext) => {\n      try {\n        if (!coreFeatures.has('observability:v1.13.2')) {\n          throw new HTTPException(501, {\n            message: 'New observability endpoints require @mastra/core >= 1.13.2, please upgrade.',\n          });\n        }\n\n        return await handler(params);\n      } catch (error) {\n        return handleError(error, `Error calling: '${def.summary.toLocaleLowerCase()}'`);\n      }\n    }) as ServerRouteHandler<\n      InferParams<TPathSchema, TQuerySchema, TBodySchema>,\n      TResponseSchema extends z.ZodTypeAny ? z.infer<TResponseSchema> : unknown,\n      'json'\n    >,\n  });\n}\n\n// ============================================================================\n// Log Routes","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/server/src/server/handlers/observability-new-endpoints.ts#L87-L123","documentation":"A 501 Not Implemented gate in the new observability route wrapper (createNewRoute) of @mastra/server. Before executing any wrapped handler it checks coreFeatures.has('observability:v1.13.2'); if the loaded @mastra/core does not advertise that feature flag, every wrapped route (list logs, list/create/get scores, aggregates, breakdowns) refuses to run and asks you to upgrade @mastra/core to >= 1.13.2.","triggerScenarios":"Hitting any of LIST_LOGS, LIST_SCORES, CREATE_SCORE, GET_SCORE, GET_SCORE_AGGREGATE, or GET_SCORE_BREAKDOWN endpoints while the workspace resolves @mastra/core < 1.13.2 (or a build whose feature set omits 'observability:v1.13.2').","commonSituations":"pnpm/yarn lockfile pinning an older @mastra/core while @mastra/server was updated; monorepo with mismatched workspace versions; deployed artifact bundling a stale core; skipping `pnpm install`/rebuild after upgrading server packages (AGENTS.md notes unresolved workspace issues often mean deps need building).","solutions":["Upgrade @mastra/core to >= 1.13.2: `pnpm install @mastra/core@latest` (or matching minor) and commit the updated lockfile.","Rebuild dependencies after the bump (`pnpm install`, then build relevant packages) so the server sees the new core features.","Verify only one @mastra/core version is installed: `pnpm why @mastra/core` / dedupe if multiple versions resolve.","If you must stay on older core, use the legacy observability endpoints instead of the new v1.13.2 routes."],"exampleFix":"// before (package.json)\n\"@mastra/core\": \"1.12.0\"\n// after\n\"@mastra/core\": \"^1.13.2\"","handlingStrategy":"fallback","validationCode":"const supported = typeof coreFeatures?.has === 'function' && coreFeatures.has('observability:v1.13.2');\nif (!supported) console.warn('Upgrade @mastra/core >= 1.13.2 for new observability endpoints.');","typeGuard":"function supportsObservabilityV2(features: Set<string> | undefined): boolean {\n  return !!features?.has('observability:v1.13.2');\n}","tryCatchPattern":"try {\n  const res = await fetch('/api/observability/scores');\n  return await res.json();\n} catch (e) {\n  if (e instanceof HTTPException && e.status === 501) {\n    // fall back to legacy observability endpoints\n  } else throw e;\n}","preventionTips":["Pin @mastra/core >= 1.13.2 alongside @mastra/server updates.","Run `pnpm why @mastra/core` to prevent duplicate/stale versions.","Rebuild after dependency bumps so feature flags refresh."],"tags":["observability","version-mismatch","http-501","upgrade"],"backgroundTag":"feature-not-supported-version","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}