{"record":{"id":"9d160c983663d1c5","repo":"mastra-ai/mastra","slug":"observability-storage-create-score-not-implemented","errorCode":"OBSERVABILITY_STORAGE_CREATE_SCORE_NOT_IMPLEMENTED","errorMessage":"This storage provider does not support creating scores","messagePattern":"This storage provider does not support creating scores","errorType":"error_code","errorClass":"MastraError","httpStatus":null,"severity":"error","filePath":"packages/core/src/storage/domains/observability/base.ts","lineNumber":569,"sourceCode":"\n  async getTags(_args: GetTagsArgs): Promise<GetTagsResponse> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_GET_TAGS_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support tag discovery',\n    });\n  }\n\n  // ============================================================================\n  // Scores\n  // ============================================================================\n\n  /**\n   * Creates a single score record.\n   */\n  async createScore(_args: CreateScoreArgs): Promise<void> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_CREATE_SCORE_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support creating scores',\n    });\n  }\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  }","sourceCodeStart":551,"sourceCodeEnd":587,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/storage/domains/observability/base.ts#L551-L587","documentation":"MastraError OBSERVABILITY_STORAGE_CREATE_SCORE_NOT_IMPLEMENTED. createScore in the observability storage base class is a stub that unconditionally throws, so writing a single score record to a provider that has not implemented score persistence produces this error. It marks score storage as an unimplemented capability.","triggerScenarios":"Calling createScore(args) (directly or via scoring pipeline) on a storage class that extends the base without overriding createScore.","commonSituations":"Scoring agents/workflows while using a storage adapter without score support; in-memory or dev storage in production scoring flows; custom adapters implementing queries but not score writes.","solutions":["Use a storage provider that implements score persistence (e.g. Postgres/Upstash observability stores)","Override createScore in your storage domain to persist score records","Gate scoring runs on a capability check or catch the error and skip/queue score writes"],"exampleFix":"// before\nawait storage.createScore(score);\n// after\ntry {\n  await storage.createScore(score);\n} catch (e) {\n  if (e.id === 'OBSERVABILITY_STORAGE_CREATE_SCORE_NOT_IMPLEMENTED') {\n    console.warn('Score storage not supported by provider; skipping score');\n    return;\n  }\n  throw e;\n}","handlingStrategy":"try-catch","validationCode":"async function supportsScoreWrites(storage) {\n  try { await storage.createScore(sampleScore); return true; }\n  catch (e) { return e?.id !== 'OBSERVABILITY_STORAGE_CREATE_SCORE_NOT_IMPLEMENTED'; }\n}","typeGuard":"function isNotImplementedError(e: unknown): e is MastraError {\n  return e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_CREATE_SCORE_NOT_IMPLEMENTED';\n}","tryCatchPattern":"try {\n  await storage.createScore(score);\n} catch (e) {\n  if (isNotImplementedError(e)) {\n    logger.warn('Storage provider does not support scores; dropping score', { score });\n    return;\n  }\n  throw e;\n}","preventionTips":["Choose a storage backend with score persistence before enabling scoring","Verify score support in staging before running production evaluations","Route scores to a dedicated store if your primary storage lacks support","Surface this error in your scoring pipeline instead of silently failing the whole run"],"tags":["storage","observability","not-implemented","scores"],"backgroundTag":"storage-method-not-implemented","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}