Help Center/Troubleshooting/Connection timeout or unreachable API

Troubleshooting

Connection timeout or unreachable API

What to do if the API is not responding.


Quick checks

  1. Check our status page: Visit Status to see if there's an ongoing incident
  2. Test with curl: curl -v https://predax.io/api/v1/health
  3. Check your firewall: Make sure outbound HTTPS (port 443) to predax.io is allowed
  4. DNS resolution: Try nslookup predax.io to verify DNS is resolving

Common causes

  • Firewall blocking outbound requests — add predax.io to your allowlist
  • Corporate proxy — configure your HTTP client to use your proxy settings
  • Server-side network issues — check if other HTTPS requests from your server work
  • DNS issues — try using 8.8.8.8 or 1.1.1.1 as your DNS resolver

Implementing resilience

For production use, implement a timeout and fallback:

const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 5000); // 5s timeout

try {
  const res = await fetch('https://predax.io/api/v1/check/ip', {
    method: 'POST',
    headers: {
      'X-API-Key': key,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ ip }),
    signal: controller.signal,
  });
  clearTimeout(timeout);
  return res.json();
} catch (err) {
  clearTimeout(timeout);
  // Fallback: allow the request through with a warning
  console.warn('Predax lookup failed, allowing traffic:', err.message);
  return { classification: { risk_score: 0 }, fallback: true };
}
Tip: Always fail open in production — if the API is unreachable, allow traffic through rather than blocking all users.

Still not working?

Contact support with:

  • Your server's IP address
  • The full error message or curl output
  • Your region/datacenter location