usebruno/bruno · error · BrunoError
Import collection failed: ${err.message}
Error message
Import collection failed: ${err.message} What it means
Thrown by convertInsomniaToBruno when the @usebruno/converters insomniaToBruno() function throws. It wraps the converter's error with a generic prefix and logs the original to the console.
Source
Thrown at packages/bruno-app/src/utils/importers/insomnia-collection.js:9
import { BrunoError } from 'utils/common/error';
import { insomniaToBruno } from '@usebruno/converters';
export const convertInsomniaToBruno = (data) => {
try {
return insomniaToBruno(data);
} catch (err) {
console.error('Error converting Insomnia to Bruno:', err);
throw new BrunoError('Import collection failed: ' + err.message);
}
};
export const isInsomniaCollection = (data) => {
// Check for Insomnia v5 collection format – collection array must be present
if (typeof data.type === 'string' && data.type.startsWith('collection.insomnia.rest/5')) {
return Array.isArray(data.collection);
}
// Check for Insomnia v4 export format – must have __export_format and resources array
if (data._type === 'export') {
return Array.isArray(data.resources) && typeof data.__export_format === 'number';
}
return false;
};
View on GitHub (pinned to 9bdd81c7bd)
Solutions
- Inspect the console.error output to see the real converter error.
- Re-export from Insomnia using a supported version and the standard export action.
- Strip unsupported resource types from the export before importing.
- Update @usebruno/converters to the latest version and retry.
Defensive patterns
Strategy: try-catch
Validate before calling
if (!isInsomniaCollection(data)) {
throw new Error('Not a recognized Insomnia export');
} Type guard
function isInsomniaCollection(data) {
if (typeof data?.type === 'string' && data.type.startsWith('collection.insomnia.rest/5')) {
return Array.isArray(data.collection);
}
if (data?._type === 'export') {
return Array.isArray(data.resources) && typeof data.__export_format === 'number';
}
return false;
} Try / catch
try {
convertInsomniaToBruno(data);
} catch (err) {
console.error('Original converter error:', err);
throw err;
} Prevention
- Run isInsomniaCollection before converting to fail fast with a clearer message.
- Re-export from a supported Insomnia version.
- Strip unsupported resource types from the export.
When it happens
Trigger: Passing data that isInsomniaCollection accepted but the converter cannot transform — e.g. an Insomnia v4/v5 export with missing required fields (method, URL, parentId), unknown resource types, or unsupported Insomnia features.
Common situations: Insomnia export from a much older/newer version than the converter supports, exports relying on plugin/gRPC/websocket entries the converter ignores, or partially-edited export files.
Related errors
- Import collection failed: ${err.message}
- Import OpenCollection failed
- Import collection failed
- The Collection file is corrupted
- Invalid collection: Neither bruno.json nor opencollection.ym
AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13).
Data as JSON: /api/errors/cdc1d390bafc6fff.
Report an issue: GitHub.