mastra-ai/mastra · error · MastraError
OBSERVABILITY_STORAGE_GET_SCORE_BREAKDOWN_NOT_IMPLEMENTED
OBSERVABILITY_STORAGE_GET_SCORE_BREAKDOWN_NOT_IMPLEMENTED
Error message
This storage provider does not support score breakdown
What it means
getScoreBreakdown groups scores by a dimension (e.g. per-agent, per-entity) and is an optional provider capability; the observability base class throws by default. This error means the configured storage adapter lacks a breakdown query implementation.
Source
Thrown at packages/core/src/storage/domains/observability/base.ts:623
throw new MastraError({
id: 'OBSERVABILITY_STORAGE_GET_SCORE_BY_ID_NOT_IMPLEMENTED',
domain: ErrorDomain.MASTRA_OBSERVABILITY,
category: ErrorCategory.SYSTEM,
text: 'This storage provider does not support getting scores by ID',
});
}
async getScoreAggregate(_args: GetScoreAggregateArgs): Promise<GetScoreAggregateResponse> {
throw new MastraError({
id: 'OBSERVABILITY_STORAGE_GET_SCORE_AGGREGATE_NOT_IMPLEMENTED',
domain: ErrorDomain.MASTRA_OBSERVABILITY,
category: ErrorCategory.SYSTEM,
text: 'This storage provider does not support score aggregation',
});
}
async getScoreBreakdown(_args: GetScoreBreakdownArgs): Promise<GetScoreBreakdownResponse> {
throw new MastraError({
id: 'OBSERVABILITY_STORAGE_GET_SCORE_BREAKDOWN_NOT_IMPLEMENTED',
domain: ErrorDomain.MASTRA_OBSERVABILITY,
category: ErrorCategory.SYSTEM,
text: 'This storage provider does not support score breakdown',
});
}
async getScoreTimeSeries(_args: GetScoreTimeSeriesArgs): Promise<GetScoreTimeSeriesResponse> {
throw new MastraError({
id: 'OBSERVABILITY_STORAGE_GET_SCORE_TIME_SERIES_NOT_IMPLEMENTED',
domain: ErrorDomain.MASTRA_OBSERVABILITY,
category: ErrorCategory.SYSTEM,
text: 'This storage provider does not support score time series',
});
}
async getScorePercentiles(_args: GetScorePercentilesArgs): Promise<GetScorePercentilesResponse> {
throw new MastraError({View on GitHub (pinned to 75dd419e61)
Solutions
- Use a provider that implements score breakdown (libsql, postgres, upstash).
- Override getScoreBreakdown in your custom adapter with a GROUP BY-style query.
- Catch the error and fall back to grouping listScores results in application code.
- Upgrade the storage adapter package to match current @mastra/core APIs.
Example fix
// before
const breakdown = await storage.getScoreBreakdown({ scope, breakdownBy: 'entityId' }); // throws
// after
try {
const breakdown = await storage.getScoreBreakdown({ scope, breakdownBy: 'entityId' });
} catch (e) {
if (e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_GET_SCORE_BREAKDOWN_NOT_IMPLEMENTED') {
return groupClientSide(await storage.listScores({ scope }), 'entityId');
}
throw e;
} Defensive patterns
Strategy: fallback
Validate before calling
const supportsBreakdown = storage.constructor.prototype.hasOwnProperty('getScoreBreakdown');
if (!supportsBreakdown) return groupClientSide(scores, breakdownBy); Type guard
function hasBreakdown(s: any): s is { getScoreBreakdown: (a: any) => Promise<any> } {
return typeof s?.getScoreBreakdown === 'function' && s.constructor.prototype.hasOwnProperty('getScoreBreakdown');
} Try / catch
try {
return await storage.getScoreBreakdown(args);
} catch (e) {
if (e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_GET_SCORE_BREAKDOWN_NOT_IMPLEMENTED') {
return groupClientSide(await safeListScores(storage, args.scope), args.breakdownBy);
}
throw e;
} Prevention
- Implement GROUP BY queries in custom adapters
- Use fully featured providers for grouped analytics
- Cache the capability result to avoid repeated failed calls
- Log unsupported analytics calls for observability
When it happens
Trigger: Calling storage.getScoreBreakdown({ scope, breakdownBy, ... }) against an adapter that extends the base without overriding it, or via UI/tooling requesting grouped score analytics from a minimal provider.
Common situations: Custom storage backends implementing only write paths; dashboards with grouped charts; adapters ported from older Mastra versions before the breakdown API existed.
Related errors
- OBSERVABILITY_STORAGE_BATCH_UPDATE_SPANS_NOT_IMPLEMENTED
- OBSERVABILITY_STORAGE_BATCH_DELETE_TRACES_NOT_IMPLEMENTED
- OBSERVABILITY_STORAGE_BATCH_CREATE_LOGS_NOT_IMPLEMENTED
- OBSERVABILITY_STORAGE_LIST_LOGS_NOT_IMPLEMENTED
- OBSERVABILITY_STORAGE_BATCH_CREATE_METRICS_NOT_IMPLEMENTED
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/3615dd083a597465.
Report an issue: GitHub.