Error Handling
Status codes, edge enforcement, and recovery patterns
Response Format
Success responses are 302 redirects. Error responses are plain text with the appropriate HTTP status code.
HTTP/1.1 404 Not Found
Content-Type: text/plain
Logo not foundStatus Codes
| Status | Meaning | Typical Causes |
|---|---|---|
| 302 | Redirect to logo asset | Successful lookup |
| 400 | Bad request | Missing/invalid domain |
| 401 | Unauthorized | Missing token or token not starting with pk_ |
| 403 | Forbidden | Domain restriction failure or attribution not satisfied |
| 404 | Not found | No logo stored for that domain |
| 429 | Too many requests | Per-minute limit reached |
| 500 | Internal error | Backend lookup failure |
Common Errors
401 Unauthorized
Body: Authentication failed
Fixes:
- Ensure
tokenquery param is present and starts withpk_. - Verify the key is active in the portal (not revoked/suspended).
403 Forbidden
Body can be Domain not allowed or Access denied.
Causes:
- Origin/Referer not on the allowlist for this key.
- Free key without valid attribution status.
Fixes:
- Add your domain(s) to the key allowlist or disable restrictions.
- Complete attribution for the Free tier or upgrade.
404 Not Found
Body: Logo not found
Fixes:
- Double-check the domain spelling.
- Provide a local fallback image in your UI.
429 Too Many Requests
Headers include Retry-After and X-RateLimit-Reset.
Fixes:
- Wait for
Retry-Afterseconds and retry with exponential backoff. - Reduce duplicate requests; cache logos locally.
500 Internal Server Error
Rare, but can occur during backend lookups.
Fixes:
- Retry with backoff.
- If repeated, contact support with timestamp and domain.
Handling Errors in Code
async function getLogo(domain, apiKey) {
const res = await fetch(`https://logos.getquikturn.io/${domain}?token=${apiKey}`);
if (res.status === 404) return '/images/fallback-logo.png';
if (res.status === 429) {
const retryAfter = Number(res.headers.get('Retry-After') || 1);
await new Promise((r) => setTimeout(r, retryAfter * 1000));
return getLogo(domain, apiKey);
}
if (!res.ok) throw new Error(`Logo fetch failed: ${res.status}`);
return URL.createObjectURL(await res.blob());
}import time, requests
def get_logo(domain: str, api_key: str) -> bytes:
res = requests.get(f"https://logos.getquikturn.io/{domain}?token={api_key}")
if res.status_code == 404:
raise FileNotFoundError("Logo not found")
if res.status_code == 429:
retry_after = int(res.headers.get("Retry-After", "1"))
time.sleep(retry_after)
return get_logo(domain, api_key)
res.raise_for_status()
return res.contentWhen to Contact Support
- Persistent 403s despite correct domains and attribution.
- Repeated 500s for the same domain.
- Unexpected 401s for keys confirmed active in the portal.