{"record":{"id":"a6ffceffa812e338","repo":"epi052/feroxbuster","slug":"err-to-string","errorCode":null,"errorMessage":"err.to_string()","messagePattern":"err\\.to_string\\(\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/main.rs","lineNumber":572,"sourceCode":"\n        // The TermOutHandler spawns a FileOutHandler, so errors in the FileOutHandler never bubble\n        // up due to the TermOutHandler never awaiting the result of FileOutHandler::start (that's\n        // done later here in main). sync checks that the tx/rx connection to the file handler works\n        if send_to_file && handles.output.sync(send_to_file).await.is_err() {\n            // output file specified and file handler could not initialize\n            clean_up(handles, tasks).await?;\n            let msg = format!(\"Couldn't start {} file handler\", config.output);\n            bail!(fmt_err(&msg));\n        }\n    }\n\n    // discard non-responsive targets\n    let live_targets = {\n        let test = heuristics::HeuristicTests::new(handles.clone());\n        let result = test.connectivity(&targets).await;\n        if let Err(err) = result {\n            clean_up(handles, tasks).await?;\n            bail!(fmt_err(&err.to_string()));\n        }\n        result?\n    };\n\n    if live_targets.is_empty() {\n        clean_up(handles, tasks).await?;\n        bail!(fmt_err(\"Could not find any live targets to scan\"));\n    }\n\n    // kick off a scan against any targets determined to be responsive\n    match scan(live_targets, handles.clone()).await {\n        Ok(_) => {}\n        Err(e) => {\n            clean_up(handles, tasks).await?;\n            bail!(fmt_err(&format!(\"Failed while scanning: {e}\")));\n        }\n    }\n","sourceCodeStart":554,"sourceCodeEnd":590,"githubUrl":"https://github.com/epi052/feroxbuster/blob/1f595dab5c76858d5a14fbc47dabf2563d729c62/src/main.rs#L554-L590","documentation":"During startup wrapped_main runs a connectivity heuristic test (HeuristicTests::connectivity) against all configured targets. If that test returns an Err (e.g. every probe request errored out), the error's string form is re-raised here and the scan is aborted before it begins.","triggerScenarios":"Calling connectivity(&targets) fails - typically because none of the target hosts resolve or accept connections, or the configured proxy is unusable, causing an underlying reqwest error surfaced via err.to_string().","commonSituations":"Typo'd or unreachable target URL, DNS failure, target behind a firewall/VPN, invalid proxy settings (--proxy), or TLS problems on the very first connection.","solutions":["Confirm the target URL is correct and reachable (curl it) before running feroxbuster","Check DNS/VPN connectivity to the host","If using --proxy, verify the proxy is up and the scheme/port are correct","Inspect the logged err (log::warn/debug) for the underlying reqwest cause","Use --insecure if a self-signed certificate blocks the connectivity probe"],"exampleFix":"// before\nferoxbuster -u https://intranet.local -p http://127.0.0.1:9999\n// after\ncurl -k https://intranet.local   # confirm reachable\nferoxbuster -u https://intranet.local -p http://127.0.0.1:8080 --insecure","handlingStrategy":"validation","validationCode":"curl -sS -o /dev/null -w '%{http_code}' --max-time 5 https://target || echo 'target unreachable'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pre-flight check targets with curl before scanning","Validate proxy connectivity independently","Keep DNS/VPN verified in scanning environments"],"tags":["network","connectivity","cli"],"backgroundTag":"network-request-failed","analyzedSha":"1f595dab5c76858d5a14fbc47dabf2563d729c62","analyzedAt":"2026-09-13T19:33:06.208Z","contentChangedAt":"2026-09-13T19:33:06.208Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}