mastra-ai/mastra · error · MastraError
OBSERVABILITY_STORAGE_LIST_SCORES_NOT_IMPLEMENTED
OBSERVABILITY_STORAGE_LIST_SCORES_NOT_IMPLEMENTED
Error message
This storage provider does not support listing scores
What it means
Mastra's abstract storage base class provides a default observability-domain implementation of listScores that intentionally throws, because scores listing requires provider-specific SQL/query support. It means the storage adapter you configured (or one extending this base without overriding listScores) does not implement score listing. The method is an opt-in capability, not a bug in your data.
Source
Thrown at packages/core/src/storage/domains/observability/base.ts:593
}
/**
* Creates multiple score observations in a single batch.
*/
async batchCreateScores(_args: BatchCreateScoresArgs): Promise<void> {
throw new MastraError({
id: 'OBSERVABILITY_STORAGE_BATCH_CREATE_SCORES_NOT_IMPLEMENTED',
domain: ErrorDomain.MASTRA_OBSERVABILITY,
category: ErrorCategory.SYSTEM,
text: 'This storage provider does not support batch creating scores',
});
}
/**
* Retrieves a list of scores with optional filtering.
*/
async listScores(_args: ListScoresArgs): Promise<ListScoresResponse> {
throw new MastraError({
id: 'OBSERVABILITY_STORAGE_LIST_SCORES_NOT_IMPLEMENTED',
domain: ErrorDomain.MASTRA_OBSERVABILITY,
category: ErrorCategory.SYSTEM,
text: 'This storage provider does not support listing scores',
});
}
/**
* Retrieves a single score by its score ID.
*/
async getScoreById(_scoreId: string): Promise<ScoreRecord | null> {
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',
});
}View on GitHub (pinned to 75dd419e61)
Solutions
- Switch to a storage provider that implements score listing (e.g. libsql, postgres, upstash) via `storage: new LibSQLStore({...})` in Mastra config.
- Implement listScores in your custom adapter by extending the base class and overriding the method.
- Wrap the call in try/catch and degrade gracefully (return empty list or hide the scores UI) when the provider lacks support.
- Check @mastra/core version parity between core and your storage package so the adapter implements current APIs.
Example fix
// before
new Mastra({ storage: new MyMinimalStore() });
await storage.listScores({ scope: { type: 'agent' } }); // throws
// after
new Mastra({ storage: new LibSQLStore({ url: 'file:mastra.db' }) });
const scores = await storage.listScores({ scope: { type: 'agent' } }); Defensive patterns
Strategy: try-catch
Validate before calling
// capability check: ensure the adapter overrides listScores
const supportsListScores =
Object.getPrototypeOf(storage.constructor.prototype).hasOwnProperty('listScores') ||
storage.constructor.prototype.hasOwnProperty('listScores');
if (!supportsListScores) { /* route to fallback or supported provider */ } Type guard
function supportsScores(storage: unknown): storage is { listScores: (a: any) => Promise<any> } {
return !!storage && typeof (storage as any).listScores === 'function' &&
(storage as any).constructor.prototype.hasOwnProperty('listScores');
} Try / catch
try {
return await storage.listScores(args);
} catch (e) {
if (e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_LIST_SCORES_NOT_IMPLEMENTED') {
logger.warn('storage does not support score listing');
return { scores: [], total: 0 };
}
throw e;
} Prevention
- Choose a storage adapter documented to support scores/observability features
- Write a startup capability probe that calls each observability method once and logs unsupported ones
- Pin @mastra/core and storage adapter versions together
- Add CI tests covering every storage method your app calls
- Gate score/feedback UI behind a feature flag tied to provider capability
When it happens
Trigger: Calling MastraStorage.listScores() on a provider that extends the observability storage base without overriding listScores — e.g. a custom or minimal storage adapter, or calling score listing APIs through agent/eval tooling wired to a provider that never implemented it.
Common situations: Using a lightweight or custom storage backend (in-memory, custom DB adapter) that only implements trace/span persistence; upgrading Mastra and calling newly added score APIs against an older third-party adapter; assuming all MastraCloud/libsql/postgres feature parity.
Related errors
- OBSERVABILITY_STORAGE_CREATE_SCORE_NOT_IMPLEMENTED
- OBSERVABILITY_STORAGE_BATCH_CREATE_SCORES_NOT_IMPLEMENTED
- OBSERVABILITY_STORAGE_GET_SCORE_BY_ID_NOT_IMPLEMENTED
- MASTRA_SCORES_STORAGE_NOT_AVAILABLE
- OBSERVABILITY_STORAGE_BATCH_UPDATE_SPANS_NOT_IMPLEMENTED
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/8bdda7173d30638a.
Report an issue: GitHub.