Overview
The Forerunner API uses conventional HTTP status codes to indicate the success or failure of requests. This guide helps you understand error responses and resolve common issues.HTTP Status Codes
Success Codes
| Code | Meaning | Description |
|---|---|---|
| 200 | OK | Request succeeded |
| 201 | Created | Resource created successfully |
| 204 | No Content | Request succeeded with no response body |
Client Error Codes
| Code | Meaning | Description |
|---|---|---|
| 400 | Bad Request | Invalid request syntax or parameters |
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | Valid credentials but insufficient permissions |
| 404 | Not Found | Requested resource does not exist |
| 409 | Conflict | Resource already exists (duplicate externalSystemId) |
| 422 | Unprocessable Entity | Request syntax is valid but contains semantic errors |
| 429 | Too Many Requests | Rate limit exceeded |
Server Error Codes
| Code | Meaning | Description |
|---|---|---|
| 500 | Internal Server Error | Unexpected server error occurred |
| 502 | Bad Gateway | Temporary server issue, retry with backoff |
| 503 | Service Unavailable | Server is temporarily unavailable |
| 504 | Gateway Timeout | Request timed out, retry with backoff |
Error Response Format
All error responses follow a consistent JSON structure with anerrors array:
Error responses also include endpoint-specific fields (like
file, sisd, property, properties) set to null or empty arrays.Example Error Responses
Common Errors
Authentication Errors
Invalid or missing API key
Invalid or missing API key
Cause: API key is malformed, missing, or invalidSolution:
- Verify API key is correctly formatted
- Ensure
Bearerprefix is included in Authorization header - Check for extra whitespace in API key value
- Add Authorization header to all requests
- Contact your Customer Success Manager for a new API key if expired
Validation Errors
Missing required fields
Missing required fields
Cause: Required parameter not provided in requestError example:Solution:
- Check API documentation for required fields
- Ensure all required fields are included in request body
Invalid date format
Invalid date format
Cause: Date provided in incorrect formatError example:Solution:
- Use
MM/DD/YYYYformat for date fields - Ensure leading zeros for single-digit months/days
Invalid file type
Invalid file type
Cause: Unsupported or incorrect file type specifiedError example:Solution:
- Use valid file types provided by your account configuration
- Check for typos in
fileTypeparameter - Common types include:
elevation_certificate,permit,map,photo,letter
Invalid GeoJSON
Invalid GeoJSON
Cause: Malformed GeoJSON coordinates or geometrySolution:
- Ensure GeoJSON follows standard format
- Verify longitude comes before latitude:
[longitude, latitude] - Validate GeoJSON structure with type and coordinates
Invalid UUID format
Invalid UUID format
Cause: Resource ID is not a valid UUIDError example:Solution:
- Ensure resource IDs are valid UUIDs
- Verify you’re using the correct ID from previous API responses
Resource Errors
Resource not found
Resource not found
Cause: Requested resource does not existSolution:
- Verify resource ID is correct
- Ensure resource hasn’t been deleted
- Check you’re querying the correct environment (staging vs production)
Property not found or cannot be matched
Property not found or cannot be matched
Cause: Could not match address or parcel to a propertyError example:Solution:
- Verify address format and spelling
- Ensure property exists in your organization’s database
- Try using parcel ID or coordinates if address matching fails
- Provide multiple identifiers for better matching
Cannot modify geospatial information
Cannot modify geospatial information
Cause: Attempted to modify
address, parcelId, or coordinates on existing recordSolution:- Geospatial information cannot be changed after record creation
- Delete the record and create a new one with correct location
- Or keep existing record and update only non-geospatial fields
Duplicate resource (409 Conflict)
Duplicate resource (409 Conflict)
Cause: Resource with the same external system ID already existsError example:Solution:
- Use a unique external system ID for each resource
- Update the existing resource instead of creating a new one
- Or omit the
externalSystemIdif not needed
File Upload Errors
File too large
File too large
Cause: Uploaded file exceeds size limitSolution:
- Compress or resize files before upload
- Split large documents into smaller files
- Contact support if you need higher limits
Unsupported file format or MIME type
Unsupported file format or MIME type
Cause: File format is not supported for the specified document typeError example:Solution:
- Convert to supported format (PDF for elevation certificates, etc.)
- Check file extension matches actual file type
- Verify MIME type is allowed for your document type
Multipart form data required
Multipart form data required
Cause: File upload not sent as multipart/form-dataSolution:
- Set
Content-Typeheader tomultipart/form-data - Use proper file upload mechanism with FormData
Implementing Error Handling
Basic Error Handling
Exponential Backoff for Retries
Implement exponential backoff for transient errors (500, 502, 503, 504):
Best Practices
Handle all error cases
Handle all error cases
Don’t just handle successful responses. Plan for and gracefully handle all possible error scenarios.
Implement exponential backoff
Implement exponential backoff
For
5xx errors and timeouts, use exponential backoff with jitter to avoid overwhelming the server.Log errors comprehensively
Log errors comprehensively
Include timestamps, request details, and full error responses in your logs for easier debugging.
Don't retry client errors
Don't retry client errors
4xx errors indicate issues with your request. Retrying won’t help - fix the request instead.Monitor API health
Monitor API health
Track error rates and response times to detect issues early.
Validate before sending
Validate before sending
Validate data client-side before making API requests to catch issues early and reduce unnecessary requests.
Debugging
- Enable verbose logging
- Test with cURL
- Verify environments
- Check API key validity
Log all requests and responses to diagnose issues:
Getting Help
If you’re experiencing issues not covered in this guide:Review your request
- Confirm all required parameters are included
- Verify data types and formats match documentation
- Check authentication header is correct
Gather debugging information
- Request ID from error response
- Full error message and status code
- Example request that reproduces the issue
- Timestamp when error occurred
Contact support
Email engineering@withforerunner.com with your debugging information