Api
Troubleshooting
Diagnosing 401s, 404s, 429s, empty responses, slow requests and redirect handling.
401 Unauthorized
Symptoms:
{
"error": {
"code": "UNAUTHORIZED",
"message": "API key required..."
}
}
Causes:
- Missing API key (no header or query param)
- Invalid API key format
- API key not found in database
- API key has been revoked
- API key has expired
Solutions:
- Verify API key is set in environment variables
- Check key format:
tento_pk_ortento_sk_prefix - Confirm key exists in Admin UI (Settings → API Keys)
- Check key expiration date
- Rotate to new key if expired or revoked
404 Not Found
Symptoms:
{
"error": {
"code": "NOT_FOUND",
"message": "Page with slug 'xyz' not found"
}
}
Causes:
- Page slug doesn't exist
- Page exists but not published
- Typo in slug
- Page was deleted
Solutions:
- Verify slug in Admin UI (Pages)
- Check page status (must be "Published")
- Try other slugs to confirm API is working
- Check slug history if page was renamed
429 Rate Limited
Symptoms:
{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests..."
}
}
Causes:
- Exceeded 600 read requests per minute (per API key)
- Exceeded the coarser per-IP WAF backstop
- Multiple clients sharing same IP (WAF counts per IP)
Solutions:
- Implement exponential backoff retry
- Add request queuing
- Use pagination instead of many individual requests
- Implement client-side caching
- Use field selection to reduce API calls
- Wait for
Retry-Afterseconds
Empty Response Data
Symptoms:
{
"data": [],
"pagination": { "total": 0 }
}
Causes:
- No published pages exist
- Filters too restrictive (type, search)
- Wrong tenant (API key from different tenant)
Solutions:
- Remove filters to see all pages
- Verify pages are published in Admin UI
- Check API key is for correct tenant
- Confirm pages exist for the page type filter
Slow Responses
Symptoms:
- Requests taking > 1 second
- Timeouts
Causes:
- Large payload (no field selection)
- Fetching many pages without pagination
- Cold cache (first request)
- Network latency
Solutions:
- Use field selection:
?fields=title,excerpt - Reduce pagination limit
- Implement caching (CDN, client-side)
- Use conditional requests with ETags
- Enable gzip compression in client
Incorrect Redirect Handling
Symptoms:
- Old slugs return 200 but URL doesn't change
- SEO penalties for duplicate content
Causes:
- Not checking
redirectfield in response - Not implementing 301 redirect in framework
Solutions:
- Check for
redirectfield in response - Implement framework redirect:
if (data.redirect) { return { redirect: { destination: `/${data.redirect.to}`, permanent: true } } } - Update canonical URL in meta tags

