Common Issues
Error 429: Too Many Requests
Error 429: Too Many Requests
Problem
When performing bulk operations, you may encounter:Cause
The server rate limits API requests to prevent overload. This commonly occurs when:- Syncing multiple users simultaneously
- Making too many requests in a short time
- Bulk downloading photos without delays
Solution
1. Sequential ProcessingProcess requests one at a time instead of in parallel:Prevention
- Process users sequentially
- Add 300-500ms delay between requests
- Use progress indicators for long operations
- Implement exponential backoff for retries
Request Timeout Errors
Request Timeout Errors
Problem
Cause
Operations take longer than the configured timeout (90 seconds by default):- Bulk photo downloads
- Large file uploads
- Slow network connection
- Server processing delays
Solution
1. Increase Timeout for Specific OperationsError 128: Photo Format Not Compatible
Error 128: Photo Format Not Compatible
Problem
Cause
Photo doesn’t meet HikCentral’s format requirements:- Invalid image format (not JPEG/PNG)
- Resolution too low
- File size too large
- Face not clearly visible
- Photo corrupted or damaged
Solution
1. Validate Photo FormatPhoto Requirements
| Requirement | Specification |
|---|---|
| Format | JPEG or PNG |
| Min Resolution | 400x400 pixels |
| Max File Size | 2MB |
| Face | Front-facing, clearly visible |
| Background | Plain, contrasting |
Error 131: User Already Registered
Error 131: User Already Registered
Error 401: Session Expired
Error 401: Session Expired
Photo Loading Issues
Photo Loading Issues
Error Code Reference
| Code | Description | Action |
|---|---|---|
| 0 | Success | Operation completed successfully |
| 128 | Photo format incompatible | Check photo meets HikCentral requirements |
| 131 | Already registered | User exists in HikCentral, skip or update |
| 401 | Unauthorized | Token expired, redirect to login |
| 429 | Too many requests | Reduce request rate, add delays |
| 500 | Server error | Check server logs, contact support |
Debugging Tips
Enable Console Logging
The application has built-in console logging:Network Tab
- Open browser DevTools (F12)
- Go to Network tab
- Filter by XHR
- Check request/response details
Check Authentication
Test API Endpoints
Use browser console or tools like Postman:Performance Optimization
Pagination
Always use pagination for large datasets:Debouncing Search
Prevent excessive API calls on search:Cache Photo URLs
Getting Help
If you encounter issues not covered here:- Check the API Configuration documentation
- Review HikCentral Integration setup
- Check server logs for backend errors
- Contact system administrator with:
- Error message
- Steps to reproduce
- Network tab screenshot
- Console error logs