mastra-ai/mastra · error · HTTPException

Blob storage domain is not available

Error message

Blob storage domain is not available

What it means

Thrown when `storage.getStore('blobs')` returns null — storage exists and the skills store resolved, but the blob storage domain is unavailable. Publishing skill files requires the blob store, so the handler aborts with a 500.

Source

Thrown at packages/server/src/server/handlers/stored-skills.ts:590

    'Snapshots the skill directory from the filesystem into content-addressable blob storage, creates a new version with a tree manifest, and marks the skill as published',
  tags: ['Stored Skills'],
  requiresAuth: true,
  handler: async ({ mastra, requestContext, storedSkillId, skillPath }) => {
    try {
      const storage = mastra.getStorage();

      if (!storage) {
        throw new HTTPException(500, { message: 'Storage is not configured' });
      }

      const skillStore = await storage.getStore('skills');
      if (!skillStore) {
        throw new HTTPException(500, { message: 'Skills storage domain is not available' });
      }

      const blobStore = await storage.getStore('blobs');
      if (!blobStore) {
        throw new HTTPException(500, { message: 'Blob storage domain is not available' });
      }

      // Verify skill exists. Skill metadata lives on the resolved snapshot.
      const existing = await skillStore.getByIdResolved(storedSkillId);
      if (!existing) {
        throw new HTTPException(404, { message: `Stored skill with id ${storedSkillId} not found` });
      }
      assertStoredResourceScope(existing, await getStoredResourceScope(mastra, requestContext));

      // Throws 404 if the caller isn't the owner, admin, or `stored-skills:write[:<id>]` holder.
      assertWriteAccess({
        requestContext,
        resource: 'stored-skills',
        resourceId: storedSkillId,
        action: 'edit',
        record: existing,
      });

View on GitHub (pinned to 75dd419e61)

Solutions

  1. Upgrade the storage adapter so both `skills` and `blobs` domains are available
  2. Use an official adapter version known to support blob storage
  3. Add the `blobs` domain to a custom adapter
  4. Log `await storage.getStore('blobs')` at startup to verify domain availability before serving traffic
Defensive patterns

Strategy: validation

Validate before calling

const [skills, blobs] = await Promise.all([storage.getStore('skills'), storage.getStore('blobs')]);
if (!skills || !blobs) throw new Error('Storage adapter must support both skills and blobs domains');

Try / catch

try { await publishStoredSkill(req); } catch (e) {
  if (e.status === 500 && /Blob storage domain/.test(e.message)) throw new Error('Upgrade adapter to one with blob storage support');
  throw e;
}

Prevention

When it happens

Trigger: Publish-skill request with an adapter that has skills support but no `blobs` domain (older adapter, partial custom adapter, blob domain disabled).

Common situations: Adapter versions where blob storage was added later than skills; custom adapters that store metadata but not blobs; configuration that explicitly disables blob storage.

Related errors


AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30). Data as JSON: /api/errors/e73fc8adc4d1bf7e. Report an issue: GitHub.