diegosouzapw/OmniRoute · error

1proxy API returned

Error message

1proxy API returned ${response.status}

What it means

Inside the 1proxy fetch loop, a page from /api/v1/proxies/advanced returned a non-2xx status. The status code is embedded in the message; the outer routine counts it toward the circuit-breaker's consecutive-failure counter.

Solutions

  1. Check 1proxy service health and the configured apiUrl
  2. Verify API credentials/quota if the status is 401/403/429
  3. Wait for the circuit breaker to reset after repeated failures
  4. Retry once the upstream recovers — the breaker reset clears the state
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/lib/oneproxySync.ts:97 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25). Data as JSON: /api/errors/9a87d584729c77ce. Report an issue: GitHub.

Appendix: source

Thrown at src/lib/oneproxySync.ts:97

      total: 0,
      error: `Circuit breaker: ${consecutiveFailures} consecutive failures. Reset required.`,
    };
  }

  let added = 0;
  let updated = 0;
  let failed = 0;
  let offset = 0;

  try {
    while (true) {
      const url = `${apiUrl}/api/v1/proxies/advanced?limit=${DEFAULT_PAGE_SIZE}&offset=${offset}&min_quality=${minQuality}&is_working=true`;
      const response = await fetch(url, {
        signal: AbortSignal.timeout(30000),
      });

      if (!response.ok) {
        throw new Error(`1proxy API returned ${response.status}`);
      }

      const data = (await response.json()) as OneProxyApiResponse;
      if (!data.proxies || data.proxies.length === 0) break;

      for (const proxy of data.proxies) {
        if (added + updated >= maxProxies) break;

        try {
          const result = await upsertOneproxyProxy({
            ip: proxy.ip,
            port: proxy.port,
            protocol: proxy.protocol,
            countryCode: proxy.country_code,
            anonymity: proxy.anonymity,
            qualityScore: proxy.quality_score,
            latencyMs: proxy.latency_ms,
            googleAccess: proxy.can_access_google,

View on GitHub (pinned to a179ffed5b)