usebruno/bruno · error · BrunoError

Import OpenCollection failed

Error message

Import OpenCollection failed

What it means

Catch-all from processOpenCollection. Unlike the Insomnia/OpenAPI wrappers, it discards the inner error message entirely — only a fixed string 'Import OpenCollection failed' is thrown, while the original is console.error-ed.

Source

Thrown at packages/bruno-app/src/utils/importers/opencollection.js:65

    });
  };

  addUidsToFolderRoot(collection.items);
  return collection;
};

export const processOpenCollection = async (jsonData) => {
  try {
    let collection = openCollectionToBruno(jsonData);
    collection = hydrateSeqInCollection(collection);
    collection = updateUidsInCollection(collection);
    collection = addUidsToRoot(collection);
    collection = transformExampleStatusInCollection(collection);
    await validateSchema(collection);
    return collection;
  } catch (err) {
    console.error('Error processing OpenCollection:', err);
    throw new BrunoError('Import OpenCollection failed');
  }
};

export const isOpenCollection = (data) => {
  if (typeof data !== 'object' || data === null) {
    return false;
  }

  if (typeof data.opencollection !== 'string' || !data.opencollection.trim()) {
    return false;
  }

  if (typeof data.info !== 'object' || data.info === null) {
    return false;
  }

  return true;
};

View on GitHub (pinned to 9bdd81c7bd)

Solutions

  1. Open DevTools console — the console.error('Error processing OpenCollection:', err) line has the real cause.
  2. Validate the OpenCollection JSON against its expected schema (opencollection field, items, examples).
  3. Trim the document to a minimal example that reproduces, then re-add sections to isolate.
  4. Retry on the latest Bruno version; report the inner error if it persists.
Defensive patterns

Strategy: try-catch

Validate before calling

if (!isOpenCollection(jsonData)) {
  throw new Error('Not an OpenCollection document');
}

Type guard

function isOpenCollection(data) {
  return data !== null && typeof data === 'object'
    && typeof data.opencollection === 'string' && data.opencollection.trim().length > 0;
}

Try / catch

try {
  await processOpenCollection(jsonData);
} catch (err) {
  // message is opaque; rely on the console.error('Error processing OpenCollection:', err)
  console.error('Inner error:', err);
  throw err;
}

Prevention

When it happens

Trigger: Any failure across the pipeline: openCollectionToBruno conversion, hydrateSeqInCollection, updateUidsInCollection, addUidsToRoot, transformExampleStatusInCollection, or the final validateSchema (error 69). All collapse into this single message.

Common situations: Malformed OpenCollection JSON, missing required fields, duplicate uids, or a schema mismatch on the hydrated collection. Because the message is opaque, the developer must check the browser console.

Related errors


AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13). Data as JSON: /api/errors/7455b088b3374e78. Report an issue: GitHub.