import { summarizeError } from '../../utils/error-display.js';
export async function safeCheck(fn) {
    try {
        return await fn();
    }
    catch (err) {
        return {
            passed: false,
            summary: `Diagnostic check failed while collecting evidence: ${summarizeError(err)}`,
            severity: 'error',
        };
    }
}
