Error Response Format
All Fetchin API errors return a JSON object with anerror field:
HTTP Status Codes
400 Bad Request
Invalid parameters or malformed request. Example:- Missing required parameters
- Invalid parameter format
- Malformed LinkedIn URL
- Check that all required parameters are included
- Verify parameter values are properly formatted
- Use LinkedIn profile URLs in the correct format
401 Unauthorized
Invalid or missing API key. Example:- Missing
X-API-Keyheader - Incorrect API key value
- Revoked or expired API key
- Include the
X-API-Keyheader in your request - Copy your API key from the dashboard
- Verify you’re using the correct key
429 Too Many Requests
Quota exceeded for your current plan. Example:- Monthly quota depleted
- Too many requests in short time period
- Wait for quota renewal (check dashboard for date)
- Upgrade to a plan with higher limits
- Implement request caching to reduce usage
500 Internal Server Error
Server-side error occurred. Example:- Temporary server issue
- LinkedIn API unavailable
- Network timeout
- Retry the request with exponential backoff
- Check API status page
- Contact support if error persists
Error Handling Examples
JavaScript/TypeScript
Python
Best Practices
Always check HTTP status codes
Always check HTTP status codes
Don’t assume requests succeed. Check
response.ok or response.status_code before processing data.Implement exponential backoff
Implement exponential backoff
For 429 and 500 errors, wait progressively longer between retries: 1s, 2s, 4s, 8s, etc.
Log errors with context
Log errors with context
Include request parameters, timestamps, and user context in error logs for debugging.
Display user-friendly messages
Display user-friendly messages
Translate technical errors into actionable messages for end users.
Set request timeouts
Set request timeouts
Don’t wait forever. Set reasonable timeouts (e.g., 30 seconds) for API requests.
Monitor error rates
Monitor error rates
Track error rates in your application to catch issues early.
Debugging Tips
Enable Verbose Logging
Check API Status
If you’re experiencing persistent errors:- Check your dashboard for quota status
- Verify your API key is active
- Test with a known-good LinkedIn profile URL
- Contact support with error details
Error Prevention
Validate inputs
Validate LinkedIn URLs before making API requests
Cache responses
Store successful responses to avoid redundant requests
Monitor quota
Check remaining quota before bulk operations
Test thoroughly
Test error handling with invalid inputs