Troubleshooting Common Issues
Connectivity Problems
When users experience connectivity issues, follow these steps:
- Verify the client device has internet access.
- Check firewall rules for ports
443
and80
. - Run a
ping
test toapi.acme.com
. - Inspect DNS resolution using
nslookup
ordig
.
# Example ping test
ping api.acme.com
# DNS check
nslookup api.acme.com
Authentication Errors
Common causes and resolutions:
- Invalid credentials – Ensure the username/password are correct and not expired.
- Token expiration – Refresh the OAuth token using the
/token/refresh
endpoint. - Scope mismatch – Verify the token includes required scopes for the API call.
# Refresh token example (cURL)
curl -X POST https://api.acme.com/token/refresh \
-H "Content-Type: application/json" \
-d '{"refresh_token":"YOUR_REFRESH_TOKEN"}'
Performance Degradation
To diagnose slow responses:
- Enable request tracing in the dashboard.
- Check server load metrics (CPU, Memory).
- Inspect database query times.
- Consider enabling caching for frequently accessed resources.
API Failures
If an API call returns an error, capture the status code
and error message
:
# Sample error handling in JavaScript
fetch('https://api.acme.com/v1/resource')
.then(res => {
if (!res.ok) throw new Error(`HTTP ${res.status}`);
return res.json();
})
.then(data => console.log(data))
.catch(err => console.error('API error:', err.message));
FAQ
- Why does my request timeout?
- Network latency or server overload. Try increasing the client timeout and retry.
- How can I view logs?
- Navigate to Logging Guide for instructions.
- Is there a status page?
- Yes, visit status.acme.com.