{"record":{"id":"c26c7357705952ae","repo":"mastra-ai/mastra","slug":"observability-storage-batch-create-feedback-not-im","errorCode":"OBSERVABILITY_STORAGE_BATCH_CREATE_FEEDBACK_NOT_IMPLEMENTED","errorMessage":"This storage provider does not support batch creating feedback","messagePattern":"This storage provider does not support batch creating feedback","errorType":"error_code","errorClass":"MastraError","httpStatus":null,"severity":"error","filePath":"packages/core/src/storage/domains/observability/base.ts","lineNumber":669,"sourceCode":"  // ============================================================================\n\n  /**\n   * Creates a single feedback record.\n   */\n  async createFeedback(_args: CreateFeedbackArgs): Promise<void> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_CREATE_FEEDBACK_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support creating feedback',\n    });\n  }\n\n  /**\n   * Creates multiple feedback observations in a single batch.\n   */\n  async batchCreateFeedback(_args: BatchCreateFeedbackArgs): Promise<void> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_BATCH_CREATE_FEEDBACK_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support batch creating feedback',\n    });\n  }\n\n  /**\n   * Retrieves a list of feedback with optional filtering.\n   */\n  async listFeedback(_args: ListFeedbackArgs): Promise<ListFeedbackResponse> {\n    throw new MastraError({\n      id: 'OBSERVABILITY_STORAGE_LIST_FEEDBACK_NOT_IMPLEMENTED',\n      domain: ErrorDomain.MASTRA_OBSERVABILITY,\n      category: ErrorCategory.SYSTEM,\n      text: 'This storage provider does not support listing feedback',\n    });\n  }","sourceCodeStart":651,"sourceCodeEnd":687,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/storage/domains/observability/base.ts#L651-L687","documentation":"batchCreateFeedback writes many feedback observations in one call and is an optional provider capability; the base class throws rather than silently looping. This error means the storage adapter lacks a batch feedback implementation.","triggerScenarios":"Calling storage.batchCreateFeedback({ records }) on an adapter extending the base without an override, or from evaluation pipelines importing bulk feedback into a minimal provider.","commonSituations":"Bulk-import scripts; eval harnesses persisting many feedback rows; custom adapters implementing only single-record writes (or none).","solutions":["Switch to a provider implementing batch feedback writes (libsql, postgres, upstash).","Implement batchCreateFeedback in your adapter (transactional multi-insert).","Catch the error and fall back to looping createFeedback, or skip with a warning.","Align adapter package version with the current core API."],"exampleFix":"// before\nawait storage.batchCreateFeedback({ records: manyFeedbackRecords }); // throws\n// after\ntry {\n  await storage.batchCreateFeedback({ records: manyFeedbackRecords });\n} catch (e) {\n  if (e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_BATCH_CREATE_FEEDBACK_NOT_IMPLEMENTED') {\n    for (const r of manyFeedbackRecords) await storage.createFeedback(r);\n    return;\n  }\n  throw e;\n}","handlingStrategy":"fallback","validationCode":"const supportsBatch = storage.constructor.prototype.hasOwnProperty('batchCreateFeedback');\nif (!supportsBatch) { for (const r of records) await storage.createFeedback(r); return; }","typeGuard":"function canBatchFeedback(s: any): s is { batchCreateFeedback: (a: any) => Promise<void> } {\n  return typeof s?.batchCreateFeedback === 'function' && s.constructor.prototype.hasOwnProperty('batchCreateFeedback');\n}","tryCatchPattern":"try {\n  await storage.batchCreateFeedback({ records });\n} catch (e) {\n  if (e instanceof MastraError && e.id === 'OBSERVABILITY_STORAGE_BATCH_CREATE_FEEDBACK_NOT_IMPLEMENTED') {\n    await Promise.all(records.map(r => storage.createFeedback(r)));\n    return;\n  }\n  throw e;\n}","preventionTips":["Implement batch inserts in custom adapters","Use transactional providers for bulk imports","Chunk client-side fallback writes to avoid overload","Test bulk import paths against the chosen adapter"],"tags":["storage","observability","not-implemented","feedback","batch"],"backgroundTag":"storage-capability-not-implemented","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}