{"record":{"id":"b9487153cf20dc5c","repo":"usebruno/bruno","slug":"failed-to-fetch-from-url-error-response-status","errorCode":null,"errorMessage":"Failed to fetch from URL: ${error.response.status} ${error.response.statusText}","messagePattern":"Failed to fetch from URL: (.+?) (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-cli/src/commands/import.js","lineNumber":113,"sourceCode":"          validateStatus: (status) => status >= 200 && status < 300\n        };\n\n        // Skip SSL certificate validation if insecure flag is set\n        if (options.insecure) {\n          console.log(chalk.yellow('Warning: SSL certificate verification is disabled. Use with caution.'));\n          axiosOptions.httpsAgent = new (require('https')).Agent({ rejectUnauthorized: false });\n        }\n\n        const response = await axios.get(source, axiosOptions);\n        content = response.data;\n      } catch (error) {\n        if (error.code === 'ECONNABORTED') {\n          throw new Error('Request timed out. The server took too long to respond.');\n        } else if (error.code === 'CERT_HAS_EXPIRED' || error.code === 'DEPTH_ZERO_SELF_SIGNED_CERT'\n          || error.code === 'ERR_TLS_CERT_ALTNAME_INVALID') {\n          throw new Error(`SSL Certificate error: ${error.code}. Try using --insecure if you trust this source.`);\n        } else if (error.response) {\n          throw new Error(`Failed to fetch from URL: ${error.response.status} ${error.response.statusText}`);\n        } else if (error.request) {\n          throw new Error(`No response received from server. Check the URL and your network connection.`);\n        } else {\n          throw new Error(`Error fetching URL: ${error.message}`);\n        }\n      }\n\n      // If response is already an object, return it directly\n      if (typeof content === 'object' && content !== null) {\n        return content;\n      }\n    } else {\n      // Handle file input\n      if (!await exists(source)) {\n        throw new Error(`File does not exist: ${source}`);\n      }\n      content = fs.readFileSync(source, 'utf8');\n    }","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-cli/src/commands/import.js#L95-L131","documentation":"Error \"Failed to fetch from URL: ${error.response.status} ${error.response.statusText}\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-cli/src/commands/import.js:113 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the HTTP status returned and correct the URL or credentials accordingly.","Confirm the remote host serves the collection file at that URL."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9bdd81c7bdc57006e5f5ebffb79321a8d979f712","analyzedAt":"2026-08-13T04:09:25.751Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}