mastra-ai/mastra · error · MastraError

OBSERVABILITY_STORAGE_GET_FEEDBACK_AGGREGATE_NOT_IMPLEMENTED

OBSERVABILITY_STORAGE_GET_FEEDBACK_AGGREGATE_NOT_IMPLEMENTED

Error message

This storage provider does not support feedback aggregation

What it means

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.

Source

Thrown at packages/core/src/storage/domains/observability/base.ts:690

      category: ErrorCategory.SYSTEM,
      text: 'This storage provider does not support batch creating feedback',
    });
  }

  /**
   * Retrieves a list of feedback with optional filtering.
   */
  async listFeedback(_args: ListFeedbackArgs): Promise<ListFeedbackResponse> {
    throw new MastraError({
      id: 'OBSERVABILITY_STORAGE_LIST_FEEDBACK_NOT_IMPLEMENTED',
      domain: ErrorDomain.MASTRA_OBSERVABILITY,
      category: ErrorCategory.SYSTEM,
      text: 'This storage provider does not support listing feedback',
    });
  }

  async getFeedbackAggregate(_args: GetFeedbackAggregateArgs): Promise<GetFeedbackAggregateResponse> {
    throw new MastraError({
      id: 'OBSERVABILITY_STORAGE_GET_FEEDBACK_AGGREGATE_NOT_IMPLEMENTED',
      domain: ErrorDomain.MASTRA_OBSERVABILITY,
      category: ErrorCategory.SYSTEM,
      text: 'This storage provider does not support feedback aggregation',
    });
  }

  async getFeedbackBreakdown(_args: GetFeedbackBreakdownArgs): Promise<GetFeedbackBreakdownResponse> {
    throw new MastraError({
      id: 'OBSERVABILITY_STORAGE_GET_FEEDBACK_BREAKDOWN_NOT_IMPLEMENTED',
      domain: ErrorDomain.MASTRA_OBSERVABILITY,
      category: ErrorCategory.SYSTEM,
      text: 'This storage provider does not support feedback breakdown',
    });
  }

  async getFeedbackTimeSeries(_args: GetFeedbackTimeSeriesArgs): Promise<GetFeedbackTimeSeriesResponse> {
    throw new MastraError({

View on GitHub (pinned to 75dd419e61)

Solutions

  1. Switch to a storage provider that implements feedback aggregation (libsql, postgres, upstash).
  2. Implement getFeedbackAggregate in your adapter (COUNT/GROUP BY over feedback rows).
  3. Catch the error and aggregate client-side from listFeedback results.
  4. Upgrade the storage adapter package to match current core APIs.

Example fix

// before
const agg = await storage.getFeedbackAggregate({ scope }); // throws
// after
try {
  const agg = await storage.getFeedbackAggregate({ scope });
} catch (e) {
  if (e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_GET_FEEDBACK_AGGREGATE_NOT_IMPLEMENTED') {
    return aggregateClientSide(await storage.listFeedback({ scope }));
  }
  throw e;
}
Defensive patterns

Strategy: fallback

Validate before calling

const supportsFeedbackAgg = storage.constructor.prototype.hasOwnProperty('getFeedbackAggregate');
if (!supportsFeedbackAgg) return aggregateClientSide(await safeListFeedback(storage, scope));

Type guard

function hasFeedbackAggregate(s: any): s is { getFeedbackAggregate: (a: any) => Promise<any> } {
  return typeof s?.getFeedbackAggregate === 'function' && s.constructor.prototype.hasOwnProperty('getFeedbackAggregate');
}

Try / catch

try {
  return await storage.getFeedbackAggregate(args);
} catch (e) {
  if (e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_GET_FEEDBACK_AGGREGATE_NOT_IMPLEMENTED') {
    return aggregateClientSide(await storage.listFeedback({ scope: args.scope }));
  }
  throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: Custom storage backends implementing only trace persistence; feedback sentiment dashboards; adapter/core version mismatches.

Related errors


AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30). Data as JSON: /api/errors/5ac4a973e8811f3c. Report an issue: GitHub.