Skip to main content

Error format

All errors return a consistent JSON structure:
{
  "error": "Unauthorized",
  "message": "Invalid or missing API key",
  "status": 401
}

Status codes

CodeNameDescription
200OKRequest successful
400Bad RequestInvalid parameters
401UnauthorizedMissing or invalid API key
404Not FoundResource not found
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer-side error
503Service UnavailableTemporary maintenance

Handling errors

try {
  const response = await fetch('https://api.fieldfunded.com/v1/events', {
    headers: { 'X-API-Key': 'YOUR_API_KEY' }
  });
  
  if (!response.ok) {
    const error = await response.json();
    console.error(`Error ${error.status}: ${error.message}`);
    return;
  }
  
  const data = await response.json();
} catch (err) {
  console.error('Network error:', err);
}
import requests

response = requests.get(
    'https://api.fieldfunded.com/v1/events',
    headers={'X-API-Key': 'YOUR_API_KEY'}
)

if response.status_code != 200:
    error = response.json()
    print(f"Error {error['status']}: {error['message']}")
else:
    data = response.json()

Quick Start Guide

Get started with error handling best practices

SDK Reference

SDK handles errors and retries automatically

Authentication

Fix 401 errors — API key setup guide

Rate Limits

Fix 429 errors — understand your quota