mastra-ai/mastra · error · MastraError

OBSERVABILITY_STORAGE_GET_FEEDBACK_PERCENTILES_NOT_IMPLEMENTED

OBSERVABILITY_STORAGE_GET_FEEDBACK_PERCENTILES_NOT_IMPLEMENTED

Error message

This storage provider does not support feedback percentiles

What it means

Thrown by the base MastraObservabilityStorage class when getFeedbackPercentiles() is called on a provider that has not implemented it. Percentile computation over feedback scores is an optional aggregation; the base class throws this error to signal the capability is missing rather than return incorrect data.

Source

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

    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({
      id: 'OBSERVABILITY_STORAGE_GET_FEEDBACK_TIME_SERIES_NOT_IMPLEMENTED',
      domain: ErrorDomain.MASTRA_OBSERVABILITY,
      category: ErrorCategory.SYSTEM,
      text: 'This storage provider does not support feedback time series',
    });
  }

  async getFeedbackPercentiles(_args: GetFeedbackPercentilesArgs): Promise<GetFeedbackPercentilesResponse> {
    throw new MastraError({
      id: 'OBSERVABILITY_STORAGE_GET_FEEDBACK_PERCENTILES_NOT_IMPLEMENTED',
      domain: ErrorDomain.MASTRA_OBSERVABILITY,
      category: ErrorCategory.SYSTEM,
      text: 'This storage provider does not support feedback percentiles',
    });
  }
}

View on GitHub (pinned to 75dd419e61)

Solutions

  1. Switch to a storage adapter that implements getFeedbackPercentiles.
  2. Override getFeedbackPercentiles in your adapter to compute percentiles over stored feedback values and return GetFeedbackPercentilesResponse.
  3. Add a capability check or try/catch fallback that hides percentile widgets when unsupported.
  4. Update the adapter to the latest version to confirm whether support was added upstream.

Example fix

// before
const p = await customStorage.getFeedbackPercentiles({ metric: 'score' }); // throws

// after
const storage = new PostgresStore({ connectionString }); // implements percentiles
const p = await storage.getFeedbackPercentiles({ metric: 'score' });
Defensive patterns

Strategy: fallback

Validate before calling

if (typeof (storage as any).getFeedbackPercentiles !== 'function') { /* unsupported */ }

Type guard

function supportsFeedbackPercentiles(s: unknown): s is MastraObservabilityStorage & { getFeedbackPercentiles(a: GetFeedbackPercentilesArgs): Promise<GetFeedbackPercentilesResponse> } {
  return typeof (s as any)?.getFeedbackPercentiles === 'function';
}

Try / catch

try {
  percentiles = await storage.getFeedbackPercentiles(args);
} catch (e) {
  if ((e as MastraError).id === 'OBSERVABILITY_STORAGE_GET_FEEDBACK_PERCENTILES_NOT_IMPLEMENTED') {
    percentiles = null; // hide percentile UI
  } else throw e;
}

Prevention

When it happens

Trigger: Calling observabilityStorage.getFeedbackPercentiles(args) on an adapter that inherits the base default implementation.

Common situations: Requesting p50/p95/p99 feedback stats in a dashboard backed by a minimal or custom storage adapter; calling new analytics APIs on an older adapter version.

Related errors


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