{"record":{"id":"e3bcb166b769de9e","repo":"projectdiscovery/subfinder","slug":"request-failed-with-status-d-e3bcb1","errorCode":null,"errorMessage":"request failed with status %d","messagePattern":"request failed with status (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/subscraping/sources/reconeer/reconeer.go","lineNumber":60,"sourceCode":"\t\t\t\"Accept\": \"application/json\",\n\t\t}\n\t\trandomApiKey := subscraping.PickRandom(s.apiKeys, s.Name())\n\t\tif randomApiKey != \"\" {\n\t\t\theaders[\"X-API-KEY\"] = randomApiKey\n\t\t}\n\t\tapiURL := fmt.Sprintf(\"https://www.reconeer.com/api/domain/%s\", domain)\n\t\ts.requests++\n\t\tresp, err := session.Get(ctx, apiURL, \"\", headers)\n\t\tif err != nil {\n\t\t\tresults <- subscraping.Result{Source: s.Name(), Type: subscraping.Error, Error: err}\n\t\t\ts.errors++\n\t\t\treturn\n\t\t}\n\n\t\tdefer session.DiscardHTTPResponse(resp)\n\n\t\tif resp.StatusCode != 200 {\n\t\t\tresults <- subscraping.Result{Source: s.Name(), Type: subscraping.Error, Error: fmt.Errorf(\"request failed with status %d\", resp.StatusCode)}\n\t\t\ts.errors++\n\t\t\treturn\n\t\t}\n\t\tvar responseData response\n\t\tdecoder := json.NewDecoder(resp.Body)\n\t\terr = decoder.Decode(&responseData)\n\t\tif err != nil {\n\t\t\tresults <- subscraping.Result{Source: s.Name(), Type: subscraping.Error, Error: err}\n\t\t\ts.errors++\n\t\t\treturn\n\t\t}\n\t\tfor _, result := range responseData.Subdomains {\n\t\t\tselect {\n\t\t\tcase <-ctx.Done():\n\t\t\t\treturn\n\t\t\tcase results <- subscraping.Result{Source: s.Name(), Type: subscraping.Subdomain, Value: result.Subdomain}:\n\t\t\t\ts.results++\n\t\t\t}","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/projectdiscovery/subfinder/blob/7a0b91f0fac01b62c65328bd771a3560ae611d6a/pkg/subscraping/sources/reconeer/reconeer.go#L42-L78","documentation":"HTTP status check in the Reconeer passive source (Run): the request to https://www.reconeer.com/api/domain/<domain> completed but returned a status other than 200. The failing status code is interpolated into the message and the source's enumeration for that domain is aborted with an error result; typical causes are an invalid X-API-KEY, rate limiting, or the domain not being processable by the service.","triggerScenarios":"The GET request to reconeer.com's domain-search endpoint returns a status other than 200 — 401/403 bad or missing API key, 402/429 quota limits, 5xx server errors.","commonSituations":"Missing Reconeer API key in provider config; exhausted free-tier quota; Reconeer service outage or endpoint path change after an API version bump.","solutions":["Check that a valid Reconeer API key is configured in your subfinder provider settings","Capture the response body (the current code discards it) to see the API's own error detail","Wait/retry if the code is 429 or 5xx; check Reconeer status","Update subfinder in case the Reconeer endpoint changed"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if reconeerApiKey == \"\" { return errors.New(\"reconeer API key missing\") }","typeGuard":null,"tryCatchPattern":"if resp.StatusCode == http.StatusTooManyRequests {\n\ttime.Sleep(backoff); retry()\n} else if resp.StatusCode >= 500 {\n\tretryWithBackoff(3)\n} else {\n\t// 4xx: fix key/config, do not retry\n}","preventionTips":["Configure a valid Reconeer key before runs","Back off on 429/5xx instead of failing fast","Log response bodies for non-200 to get the API's detail","Keep subfinder updated for endpoint changes"],"tags":["go","http","api-error"],"backgroundTag":"http-non-200-response","analyzedSha":"7a0b91f0fac01b62c65328bd771a3560ae611d6a","analyzedAt":"2026-09-06T23:52:02.109Z","contentChangedAt":"2026-09-06T23:52:02.109Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}