Skip to main content

Common Errors Reference

Quick solutions to the most common KnoxCall errors.

403 Forbidden

Error Message

What It Means

Your IP address isn’t whitelisted for this route.

Quick Fix

  1. Check your IP: curl https://api.ipify.org
  2. Go to ResourcesClients
  3. Update or create client with your IP
  4. Assign client to route

See Also

IP Authorization Issues Guide - Comprehensive troubleshooting

404 Route Not Found

Error Message

What It Means

The route name in your x-knoxcall-route header doesn’t exist.

Common Causes

1. Typo in Route Name

Solution: Double-check spelling. Route names are case-sensitive.

2. Route Disabled

Check:
  1. Go to Routes
  2. Find your route
  3. Is Enabled toggle ON?
Solution: Enable the route.

3. Route Deleted

Symptom: Route worked before, now 404. Solution: Someone deleted it. Recreate the route or check with your team.

4. Wrong Environment

Solution:
  • Use correct environment name
  • Or create route in the environment you’re calling

401 Unauthorized

Error Message

What It Means

Your KnoxCall API key (x-knoxcall-key) is invalid or missing.

Common Causes

1. Missing API Key

Solution: Add the API key header:

2. Wrong API Key

Check:
  • Did you copy the full 77-character key?
  • Is it the correct key for this tenant?
  • Has the key been deleted?
Solution:
  1. Go to SettingsTenant tab → API Keys
  2. Verify key exists and is enabled
  3. Generate new key if needed

3. API Key Deleted

Symptom: Worked before, now 401. Solution: Someone deleted the key. Generate a new one.

502 Bad Gateway

Error Message

What It Means

KnoxCall couldn’t connect to your backend API.

Common Causes

1. Backend Server Down

Your backend API isn’t running or crashed. Test directly:
If this fails: Your backend is down. Restart it.

2. Wrong Target URL

Route points to incorrect backend URL. Check:
  1. Go to Routes → Your route
  2. Look at Target Base URL
  3. Is it correct?
Common mistakes:

3. Firewall Blocking

Your backend firewall is blocking KnoxCall’s requests. Solution:
  • Whitelist KnoxCall’s IP addresses in your backend firewall
  • Or disable firewall for testing (not recommended for production)

4. SSL/TLS Issues

Backend has invalid SSL certificate. Symptoms:
Solution:
  • Use valid SSL certificate on backend
  • Don’t use self-signed certs in production

5. DNS Not Resolving

Backend domain doesn’t exist or isn’t resolving. Test:
If “Could not resolve host”: DNS issue. Check domain registration and DNS records.

504 Gateway Timeout

Error Message

What It Means

Your backend API took too long to respond (>30 seconds default).

Common Causes

1. Slow Backend Processing

Your API is taking forever to process the request. Examples:
  • Heavy database query
  • Third-party API call timing out
  • Large file processing
  • Infinite loop in code
Solution:
  • Optimize your backend code
  • Add database indexes
  • Use async processing for long tasks
  • Implement timeouts on third-party calls

2. Backend Deadlock

Your backend is stuck waiting for something. Check:
  • Database connections maxed out?
  • Waiting for external service?
  • Thread pool exhausted?
Solution: Restart backend server, investigate logs.

3. Network Latency

Slow network between KnoxCall and your backend. Test:
If >30 seconds: Network or backend is too slow.

See Also

504 Errors Deep Dive

500 Internal Server Error

Error Message

What It Means

Either KnoxCall or your backend had an unexpected error.

How to Debug

Check Which Side Failed

If error details show:
→ Your backend returned 500 (backend problem) If error details show:
→ KnoxCall internal error (rare)

Backend 500 Errors

Solution:
  1. Check your backend logs
  2. Look for stack traces, exceptions
  3. Fix the bug in your backend code
  4. Common causes:
    • Null pointer exceptions
    • Missing environment variables
    • Database connection errors
    • Uncaught exceptions

KnoxCall 500 Errors

Solution:
  1. Check LogsAPI Logs for details
  2. Contact support if it’s a KnoxCall bug
  3. Check if it’s a secret resolution issue

429 Too Many Requests

Error Message

What It Means

You’ve hit a rate limit.

Common Causes

1. Route Rate Limit

Your route has rate limiting enabled. Check:
  1. Go to Routes → Your route
  2. Check Rate Limiting settings
  3. What’s the limit? (e.g., 100 requests/minute)
Solution:
  • Slow down your requests
  • Increase rate limit (if you control it)
  • Use exponential backoff and retry

2. API Key Rate Limit

Your API key has a global rate limit. Solution: Wait for the rate limit window to reset (check retry_after in response).

3. Burst Traffic

You sent a burst of requests all at once. Solution:
  • Implement request queuing
  • Add delays between requests
  • Use connection pooling

Secret Not Found

Error:
What It Means: Route references a secret that doesn’t exist. Solution:
  1. Go to ResourcesSecrets
  2. Check if stripe_key exists
  3. If not, create it
  4. If yes, check spelling in route config

Template Syntax Error

Error:
What It Means: Wrong template format in route config. Common mistakes:

Secret Decryption Error

Error:
What It Means: Secret value is corrupted or encryption key changed. Solution:
  1. Delete the secret
  2. Recreate with same name
  3. Update value
  4. Test again

Environment Errors

Environment Not Found

Error:
What It Means: You specified an environment that doesn’t exist. Solution:
  1. Go to ResourcesEnvironments
  2. Check if “staging” exists
  3. Create it if missing
  4. Or use existing environment name

No Override Configuration

Error:
What It Means: Environment exists but has no config for this route. Solution:
  1. Go to Routes → Your route
  2. Click Environment tab
  3. Add configuration for “staging” environment

Network/Connection Errors

ECONNREFUSED

Error:
What It Means: Backend server is not running or not listening on that port. Solution:
  • Start your backend server
  • Check port is correct
  • Don’t use localhost/127.0.0.1 (not accessible from KnoxCall)

ENOTFOUND

Error:
What It Means: DNS lookup failed. Domain doesn’t exist. Solution:
  • Check domain spelling
  • Verify domain is registered
  • Check DNS records are configured

ETIMEDOUT

Error:
What It Means: Connection attempt timed out (before request even sent). Solution:
  • Check backend is accessible from internet
  • Verify firewall allows incoming connections
  • Check backend server isn’t crashed

Client/Authorization Errors (Summary)


Error Response Format

All KnoxCall errors follow this format:
Use request_id when contacting support!

Quick Debugging Steps

Follow these steps for any error:

1. Check Error Code

2. Check Logs

  1. Go to LogsAPI Logs
  2. Find your failed request
  3. Click to expand details
  4. Look for:
    • Request headers sent
    • Response from backend
    • Error stack trace

3. Test Backend Directly

If this fails: Problem is with your backend, not KnoxCall.

4. Check Route Configuration

  1. Route enabled?
  2. Target URL correct?
  3. Methods allowed?
  4. Clients assigned?
  5. Secrets exist?

Getting Help

If error persists:

Debugging Routes

Step-by-step debugging guide

API Logs

Review detailed request logs

IP Issues

Fix IP authorization problems

504 Errors

Timeout troubleshooting

Support Chat

Live help from support team
When contacting support, include:
  1. Error message (full JSON response)
  2. Request ID from logs
  3. What you tried
  4. Route name and configuration

Error Prevention Tips

For Development

  • ✅ Use test API keys with “allow any IP”
  • ✅ Test backend directly first
  • ✅ Check logs after every change
  • ✅ Start with simple route, add complexity gradually

For Production

  • ✅ Use static IPs for servers
  • ✅ Set up monitoring and alerts
  • ✅ Test in staging environment first
  • ✅ Have error handling in client code
  • ✅ Implement retry logic with exponential backoff

General Best Practices

  • ✅ Keep route names descriptive and unique
  • ✅ Document what each secret is for
  • ✅ Regularly audit and clean up unused clients
  • ✅ Monitor API logs for patterns
  • ✅ Set up health check endpoints

Pro Tip: 90% of errors are one of three things: IP authorization (403), route not found (404), or backend issues (502/504). Check these first!