Authentication Errors
Missing RECURSE_PAT Environment Variable
Cause: The required Personal Access Token environment variable is not configured. Solution:Alternative: Export directly
Alternative: Export directly
If you don’t want to use a
.env file:Authentication Failed (401)
Cause: The Personal Access Token is invalid, expired, or malformed. Common Reasons:- Token was copied incorrectly (extra spaces, missing characters)
- Token has been revoked or expired
- Token was created for a different environment
Generate new token
Create a fresh Personal Access Token:
- Log in to www.recurse.com
- Navigate to Settings → Personal Access Tokens
- Create a new token with description “VCF Generator”
- Copy the token immediately
You can also test authentication using basic auth to create a new token programmatically (see
rc_api::create_token()).API Errors
Resource Not Found (404)
Cause: The requested profile, batch, or resource doesn’t exist or you don’t have access to it. Common Scenarios:Profile not found
Profile not found
Batch not found
Batch not found
Bad Request (400)
Cause: Invalid parameters or malformed request data. Common Issues:Invalid query parameters
Invalid query parameters
Invalid date format
Invalid date format
NaiveDate parsing:API Error (Other Status Codes)
Cause: Unexpected server error or rate limiting. Common Status Codes:| Status | Meaning | Common Cause |
|---|---|---|
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server-side issue |
| 503 | Service Unavailable | Maintenance or downtime |
Network Errors
HTTP Request Failed
Cause: Network connectivity issues or DNS resolution failures. Common Scenarios:Connection timeout
Connection timeout
Error:
HTTP request failed: operation timed outSolution:- Check your internet connection
- Verify you can reach
www.recurse.com: - Check if you’re behind a proxy or firewall
- Try again later if the RC servers are experiencing issues
DNS resolution failed
DNS resolution failed
Error:
HTTP request failed: failed to lookup address informationSolution:- Check your DNS settings
- Try using a different DNS server (e.g., 8.8.8.8)
- Verify
/etc/hostsdoesn’t have incorrect entries - Flush your DNS cache:
SSL/TLS certificate errors
SSL/TLS certificate errors
Error:
HTTP request failed: certificate verify failedSolution:- Update your system’s CA certificates:
- Check your system clock is correct (TLS certs are time-sensitive)
- If behind a corporate proxy, you may need to add custom CA certificates
JSON Deserialization Errors
Failed to Deserialize Response
Cause: The API returned unexpected data that doesn’t match the expected structure. Debugging: When deserialization fails, the error handler prints the raw response:API schema changed
API schema changed
The Recurse Center API may have updated its schema.Solution:
- Check if there’s a newer version of this tool
- Report the issue with the error details
- The response body in the error message shows what the API actually returned
Using deprecated endpoint
Using deprecated endpoint
You’re using a deprecated API method.Solution:
Replace deprecated methods:
Partial response
Partial response
Some optional fields might be unexpectedly null.Solution: Most fields in the data structures are already
Option<T>, but if you encounter this:- Check the raw response in the error message
- Report the issue if a required field is actually optional
- Use
#[serde(default)]annotation if contributing a fix
VCF File Issues
Unable to Create Output File
Cause: Permission denied or invalid output path. Solution:VCF Import Issues
Contacts not importing
Contacts not importing
Problem: VCF file is created but contacts don’t import into your contacts app.Solution:
- Verify the file is valid VCF format:
- Try a different contacts app (some are more forgiving of format variations)
- Check the app’s import logs for specific errors
Photos not appearing
Photos not appearing
Problem: Contacts import but photos are missing.Causes:
- Profile has no photo (image path contains “missing”)
- Photo download failed during generation
- Contact app doesn’t support embedded photos
- Check the terminal output for download errors
- Note that not all Recursers have profile photos
- Some contacts apps require re-syncing to show photos
Duplicate contacts
Duplicate contacts
Problem: Importing creates duplicate entries.Solution:
- Most contact apps can merge duplicates automatically
- Use the UID field to identify duplicates (format:
recurser-{id}) - Delete the old import before re-importing
Special characters corrupted
Special characters corrupted
Problem: Names or fields with special characters display incorrectly.Solution:
- Verify the VCF file is UTF-8 encoded:
- If using Windows, ensure your contacts app supports UTF-8
- Try opening the VCF in a text editor to verify the data
Build and Runtime Errors
Failed to Create API Client
Cause: Error initializing the HTTP client. Solution:- TLS initialization failure (missing OpenSSL libraries)
- System configuration issues
Compilation Errors
Missing dependencies
Missing dependencies
Error:
error: failed to run custom build command for 'openssl-sys'Solution: Install OpenSSL development libraries (see above).Rust version too old
Rust version too old
Error:
error: package requires rustc 1.70.0 or newerSolution: Update Rust:Getting Help
If you encounter an issue not covered here:- Check the error message carefully - Most errors include helpful context
- Enable debug logging - Set
RUST_LOG=debugto see more details: - Check the raw API response - Deserialization errors print the actual JSON received
- Verify your environment - Ensure RECURSE_PAT is set and valid
- Search existing issues - Check if others have encountered the same problem
- Report the issue - Include:
- Full error message
- Operating system and Rust version
- Steps to reproduce
- Relevant log output (with sensitive data removed)