{"record":{"id":"331d8642b24c12d0","repo":"mastra-ai/mastra","slug":"scorer-definitions-storage-domain-is-not-available-331d86","errorCode":null,"errorMessage":"Scorer definitions storage domain is not available","messagePattern":"Scorer definitions storage domain is not available","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"packages/server/src/server/handlers/stored-scorers.ts","lineNumber":59,"sourceCode":"  path: '/stored/scorers',\n  responseType: 'json',\n  queryParamSchema: listStoredScorersQuerySchema,\n  responseSchema: listStoredScorersResponseSchema,\n  summary: 'List stored scorer definitions',\n  description: 'Returns a paginated list of all scorer definitions stored in the database',\n  tags: ['Stored Scorers'],\n  requiresAuth: true,\n  handler: async ({ mastra, page, perPage, orderBy, status, authorId, metadata, requestContext }) => {\n    try {\n      const storage = mastra.getStorage();\n\n      if (!storage) {\n        throw new HTTPException(500, { message: 'Storage is not configured' });\n      }\n\n      const scorerStore = await storage.getStore('scorerDefinitions');\n      if (!scorerStore) {\n        throw new HTTPException(500, { message: 'Scorer definitions storage domain is not available' });\n      }\n\n      const scope = await getStoredResourceScope(mastra, requestContext);\n      const result = await scorerStore.listResolved({\n        page,\n        perPage,\n        orderBy,\n        status,\n        authorId,\n        metadata: scopeStoredResourceMetadata(metadata, scope),\n      });\n\n      return result;\n    } catch (error) {\n      return handleError(error, 'Error listing stored scorer definitions');\n    }\n  },\n});","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/server/src/server/handlers/stored-scorers.ts#L41-L77","documentation":"Thrown when storage is configured but `storage.getStore('scorerDefinitions')` returns undefined — the storage adapter does not provide the scorer-definitions domain store. The handler needs this specialized store to run `listResolved`, so it fails fast with HTTP 500.","triggerScenarios":"GET stored scorers list against a custom or legacy storage adapter that hasn't implemented the `scorerDefinitions` store, or a storage backend version older than the scorer-definitions domain.","commonSituations":"Using a third-party or community storage adapter that lags behind core; custom storage class overriding getStore and dropping newer domains; upgrading @mastra/core but keeping an old storage package version.","solutions":["Upgrade the storage adapter package (e.g. @mastra/pg, @mastra/libsql) to a version matching @mastra/core so the scorerDefinitions store is implemented.","Switch to an officially supported adapter known to implement scorer definitions.","If using a custom store, implement the `scorerDefinitions` domain (listResolved/getByIdResolved/create/update/delete)."],"exampleFix":"// before\n\"@mastra/core\": \"^0.10.0\", \"@mastra/libsql\": \"^0.9.0\" // mismatched\n\n// after\n\"@mastra/core\": \"^0.10.0\", \"@mastra/libsql\": \"^0.10.0\" // aligned versions","handlingStrategy":"validation","validationCode":"const store = await mastra.getStorage()?.getStore('scorerDefinitions');\nif (!store) throw new Error('Storage adapter does not implement scorerDefinitions domain.');","typeGuard":"function hasScorerStore(s: unknown): s is { getStore(d: 'scorerDefinitions'): Promise<object | null> } {\n  return typeof (s as any)?.getStore === 'function';\n}","tryCatchPattern":"try {\n  const scorers = await listStoredScorers();\n} catch (e) {\n  if (String(e).includes('storage domain is not available')) {\n    console.error('Upgrade your storage adapter package to support scorer definitions.');\n  }\n  throw e;\n}","preventionTips":["Keep @mastra/core and the storage adapter package on matching versions","Prefer official adapters (LibSQL, Postgres, Upstash) that implement all domains","After upgrading core, run a smoke check that getStore('scorerDefinitions') resolves"],"tags":["storage","http-500","version-mismatch","configuration"],"backgroundTag":"storage-domain-not-available","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}