{"record":{"id":"8bdda7173d30638a","repo":"mastra-ai/mastra","slug":"observability-storage-list-scores-not-implemented","errorCode":"OBSERVABILITY_STORAGE_LIST_SCORES_NOT_IMPLEMENTED","errorMessage":"This storage provider does not support listing scores","messagePattern":"This storage provider does not support listing scores","errorType":"error_code","errorClass":"MastraError","httpStatus":null,"severity":"error","filePath":"packages/core/src/storage/domains/observability/base.ts","lineNumber":593,"sourceCode":"  }\n\n  /**\n   * Creates multiple score observations in a single batch.\n   */\n  async batchCreateScores(_args: BatchCreateScoresArgs): Promise<void> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_BATCH_CREATE_SCORES_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support batch creating scores',\n    });\n  }\n\n  /**\n   * Retrieves a list of scores with optional filtering.\n   */\n  async listScores(_args: ListScoresArgs): Promise<ListScoresResponse> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_LIST_SCORES_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support listing scores',\n    });\n  }\n\n  /**\n   * Retrieves a single score by its score ID.\n   */\n  async getScoreById(_scoreId: string): Promise<ScoreRecord | null> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_GET_SCORE_BY_ID_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support getting scores by ID',\n    });\n  }","sourceCodeStart":575,"sourceCodeEnd":611,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/storage/domains/observability/base.ts#L575-L611","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nnew Mastra({ storage: new MyMinimalStore() });\nawait storage.listScores({ scope: { type: 'agent' } }); // throws\n// after\nnew Mastra({ storage: new LibSQLStore({ url: 'file:mastra.db' }) });\nconst scores = await storage.listScores({ scope: { type: 'agent' } });","handlingStrategy":"try-catch","validationCode":"// capability check: ensure the adapter overrides listScores\nconst supportsListScores =\n  Object.getPrototypeOf(storage.constructor.prototype).hasOwnProperty('listScores') ||\n  storage.constructor.prototype.hasOwnProperty('listScores');\nif (!supportsListScores) { /* route to fallback or supported provider */ }","typeGuard":"function supportsScores(storage: unknown): storage is { listScores: (a: any) => Promise<any> } {\n  return !!storage && typeof (storage as any).listScores === 'function' &&\n    (storage as any).constructor.prototype.hasOwnProperty('listScores');\n}","tryCatchPattern":"try {\n  return await storage.listScores(args);\n} catch (e) {\n  if (e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_LIST_SCORES_NOT_IMPLEMENTED') {\n    logger.warn('storage does not support score listing');\n    return { scores: [], total: 0 };\n  }\n  throw e;\n}","preventionTips":["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"],"tags":["storage","observability","not-implemented","scores"],"backgroundTag":"storage-capability-not-implemented","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}