usebruno/bruno · error · Error

Failed to fetch from URL: ${error.response.status} ${error.r

Error message

Failed to fetch from URL: ${error.response.status} ${error.response.statusText}

What it means

Error "Failed to fetch from URL: ${error.response.status} ${error.response.statusText}" thrown in usebruno/bruno.

Source

Thrown at packages/bruno-cli/src/commands/import.js:113

          validateStatus: (status) => status >= 200 && status < 300
        };

        // Skip SSL certificate validation if insecure flag is set
        if (options.insecure) {
          console.log(chalk.yellow('Warning: SSL certificate verification is disabled. Use with caution.'));
          axiosOptions.httpsAgent = new (require('https')).Agent({ rejectUnauthorized: false });
        }

        const response = await axios.get(source, axiosOptions);
        content = response.data;
      } catch (error) {
        if (error.code === 'ECONNABORTED') {
          throw new Error('Request timed out. The server took too long to respond.');
        } else if (error.code === 'CERT_HAS_EXPIRED' || error.code === 'DEPTH_ZERO_SELF_SIGNED_CERT'
          || error.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {
          throw new Error(`SSL Certificate error: ${error.code}. Try using --insecure if you trust this source.`);
        } else if (error.response) {
          throw new Error(`Failed to fetch from URL: ${error.response.status} ${error.response.statusText}`);
        } else if (error.request) {
          throw new Error(`No response received from server. Check the URL and your network connection.`);
        } else {
          throw new Error(`Error fetching URL: ${error.message}`);
        }
      }

      // If response is already an object, return it directly
      if (typeof content === 'object' && content !== null) {
        return content;
      }
    } else {
      // Handle file input
      if (!await exists(source)) {
        throw new Error(`File does not exist: ${source}`);
      }
      content = fs.readFileSync(source, 'utf8');
    }

View on GitHub (pinned to 9bdd81c7bd)

Solutions

  1. Check the HTTP status returned and correct the URL or credentials accordingly.
  2. Confirm the remote host serves the collection file at that URL.

When it happens

Trigger: Thrown at packages/bruno-cli/src/commands/import.js:113 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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