{"record":{"id":"7f8948c77422a95b","repo":"vxcontrol/pentagi","slug":"sploitus-api-rate-limit-exceeded-http-d-please","errorCode":null,"errorMessage":"Sploitus API rate limit exceeded (HTTP %d), please try again later","messagePattern":"Sploitus API rate limit exceeded \\(HTTP (.+?)\\), please try again later","errorType":"http","errorClass":"Retryable","httpStatus":null,"severity":"warning","filePath":"backend/pkg/tools/searchers/sploitus.go","lineNumber":162,"sourceCode":"\treq.Header.Set(\"User-Agent\", \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36\")\n\treq.Header.Set(\"sec-ch-ua\", `\"Not:A-Brand\";v=\"99\", \"Google Chrome\";v=\"145\", \"Chromium\";v=\"145\"`)\n\treq.Header.Set(\"sec-ch-ua-mobile\", \"?0\")\n\treq.Header.Set(\"sec-ch-ua-platform\", `\"macOS\"`)\n\treq.Header.Set(\"sec-fetch-dest\", \"empty\")\n\treq.Header.Set(\"sec-fetch-mode\", \"cors\")\n\treq.Header.Set(\"sec-fetch-site\", \"same-origin\")\n\treq.Header.Set(\"DNT\", \"1\")\n\n\tresp, err := client.Do(req)\n\tif err != nil {\n\t\treturn \"\", Retryable(fmt.Errorf(\"request to Sploitus failed: %w\", err), 0)\n\t}\n\tdefer resp.Body.Close()\n\n\t// Sploitus API returns 499 (and sometimes 422) when its rate limit is temporarily\n\t// exceeded — a transient condition that may clear on retry.\n\tif resp.StatusCode == 499 || resp.StatusCode == 422 {\n\t\treturn \"\", Retryable(fmt.Errorf(\"Sploitus API rate limit exceeded (HTTP %d), please try again later\", resp.StatusCode), 0)\n\t}\n\n\tif resp.StatusCode != http.StatusOK {\n\t\terr := fmt.Errorf(\"Sploitus API returned HTTP %d\", resp.StatusCode)\n\t\tif resp.StatusCode == http.StatusTooManyRequests || resp.StatusCode >= 500 {\n\t\t\treturn \"\", Retryable(err, 0)\n\t\t}\n\t\treturn \"\", Fatal(err)\n\t}\n\n\tvar apiResp sploitusResponse\n\tif err := json.NewDecoder(resp.Body).Decode(&apiResp); err != nil {\n\t\treturn \"\", Fatal(fmt.Errorf(\"failed to decode Sploitus response: %w\", err))\n\t}\n\n\treturn formatSploitusResults(query, exploitType, limit, apiResp), nil\n}\n","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/vxcontrol/pentagi/blob/ea665308baaff015b226f308438a68d929d0f29b/backend/pkg/tools/searchers/sploitus.go#L144-L180","documentation":"Sploitus signals rate limiting with HTTP 499 and sometimes 422; the searcher maps both to a Retryable error (delay 0) telling the caller to try again later. This is deliberate: these statuses mean the limit is temporarily exceeded and may clear on retry or by switching to a fallback engine.","triggerScenarios":"Handle() receives resp.StatusCode 499 or 422 from the POST to the Sploitus API while performing frequent exploit-title searches.","commonSituations":"Many flows/agents issue web_search calls in a burst, sharing one public IP (container host or corporate egress), tripping Sploitus' per-IP limit; Cloudflare fronting also returns 422 when challenged.","solutions":["Back off and retry later; the error is already Retryable so the orchestrator fallback chain will try other engines","Reduce search frequency / add spacing between Sploitus queries in agent prompts or orchestration","Route egress through a different IP or proxy if the host IP is rate limited","Ensure other searchers are configured so web_search has fallbacks when Sploitus throttles"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if resp.StatusCode == 499 || resp.StatusCode == 422 {\n    // treat as transient: back off, then retry or use fallback engine\n    return \"\", Retryable(fmt.Errorf(\"Sploitus API rate limit exceeded (HTTP %d)\", resp.StatusCode), 0)\n}","preventionTips":["Spread Sploitus queries over time instead of bursting from parallel agents","Keep fallback searchers configured in web_search.go fallbackStrategy","Monitor HTTP 499/422 frequency and alert on sustained throttling","Consider rotating egress IPs if a shared host IP trips limits"],"tags":["rate-limit","http-status","sploitus","retryable"],"backgroundTag":"api-rate-limit-exceeded","analyzedSha":"ea665308baaff015b226f308438a68d929d0f29b","analyzedAt":"2026-09-01T14:16:31.421Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}