{"record":{"id":"5ac4a973e8811f3c","repo":"mastra-ai/mastra","slug":"observability-storage-get-feedback-aggregate-not-i","errorCode":"OBSERVABILITY_STORAGE_GET_FEEDBACK_AGGREGATE_NOT_IMPLEMENTED","errorMessage":"This storage provider does not support feedback aggregation","messagePattern":"This storage provider does not support feedback aggregation","errorType":"error_code","errorClass":"MastraError","httpStatus":null,"severity":"error","filePath":"packages/core/src/storage/domains/observability/base.ts","lineNumber":690,"sourceCode":"      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support batch creating feedback',\n    });\n  }\n\n  /**\n   * Retrieves a list of feedback with optional filtering.\n   */\n  async listFeedback(_args: ListFeedbackArgs): Promise<ListFeedbackResponse> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_LIST_FEEDBACK_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support listing feedback',\n    });\n  }\n\n  async getFeedbackAggregate(_args: GetFeedbackAggregateArgs): Promise<GetFeedbackAggregateResponse> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_GET_FEEDBACK_AGGREGATE_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support feedback aggregation',\n    });\n  }\n\n  async getFeedbackBreakdown(_args: GetFeedbackBreakdownArgs): Promise<GetFeedbackBreakdownResponse> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_GET_FEEDBACK_BREAKDOWN_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support feedback breakdown',\n    });\n  }\n\n  async getFeedbackTimeSeries(_args: GetFeedbackTimeSeriesArgs): Promise<GetFeedbackTimeSeriesResponse> {\n    throw new MastraError({","sourceCodeStart":672,"sourceCodeEnd":708,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/storage/domains/observability/base.ts#L672-L708","documentation":"getFeedbackAggregate computes summary statistics over feedback records; the base observability storage class throws by default because aggregation is provider-specific. This error indicates the configured adapter does not implement feedback aggregation.","triggerScenarios":"Calling storage.getFeedbackAggregate({ scope, filters }) on an adapter extending the base without an override, or via analytics/UI requesting feedback summary metrics from a minimal provider.","commonSituations":"Custom storage backends implementing only trace persistence; feedback sentiment dashboards; adapter/core version mismatches.","solutions":["Switch to a storage provider that implements feedback aggregation (libsql, postgres, upstash).","Implement getFeedbackAggregate in your adapter (COUNT/GROUP BY over feedback rows).","Catch the error and aggregate client-side from listFeedback results.","Upgrade the storage adapter package to match current core APIs."],"exampleFix":"// before\nconst agg = await storage.getFeedbackAggregate({ scope }); // throws\n// after\ntry {\n  const agg = await storage.getFeedbackAggregate({ scope });\n} catch (e) {\n  if (e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_GET_FEEDBACK_AGGREGATE_NOT_IMPLEMENTED') {\n    return aggregateClientSide(await storage.listFeedback({ scope }));\n  }\n  throw e;\n}","handlingStrategy":"fallback","validationCode":"const supportsFeedbackAgg = storage.constructor.prototype.hasOwnProperty('getFeedbackAggregate');\nif (!supportsFeedbackAgg) return aggregateClientSide(await safeListFeedback(storage, scope));","typeGuard":"function hasFeedbackAggregate(s: any): s is { getFeedbackAggregate: (a: any) => Promise<any> } {\n  return typeof s?.getFeedbackAggregate === 'function' && s.constructor.prototype.hasOwnProperty('getFeedbackAggregate');\n}","tryCatchPattern":"try {\n  return await storage.getFeedbackAggregate(args);\n} catch (e) {\n  if (e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_GET_FEEDBACK_AGGREGATE_NOT_IMPLEMENTED') {\n    return aggregateClientSide(await storage.listFeedback({ scope: args.scope }));\n  }\n  throw e;\n}","preventionTips":["Choose analytics-capable providers for feedback metrics","Implement aggregate queries in custom adapters","Cache capability probes at startup","Monitor logs for NOT_IMPLEMENTED errors as capability signals"],"tags":["storage","observability","not-implemented","feedback","aggregation"],"backgroundTag":"storage-capability-not-implemented","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}