Skip to main content

Error Handling

When working with Syndica's Solana RPC API, you may encounter HTTP status codes and JSON-RPC error codes. This guide explains common errors and how to resolve them.

HTTP Status Codes

HTTP status codes indicate the result of your request at the transport layer. You'll see these codes in RPC Analytics and application logs.

HTTP CodeMessageDescriptionHow to Fix
200SuccessRequest processed successfullyNo action needed
401UnauthorizedInvalid or missing API keyVerify your API key is correct and not expired
402Payment RequiredRequires a paid accountUpgrade your plan to access this feature
429Rate Limit ExceededToo many requestsReduce request rate, configure custom rate limits, or upgrade your plan
503Service UnavailableTemporary service disruptionCheck status.syndica.io and retry
Handling Rate Limits

When you receive a 429 error:

  • Implement exponential backoff in your retry logic
  • Consider request throttling or debouncing for non-critical calls
  • Configure custom rate limits per API key to control usage more precisely
  • Upgrade your plan for higher RPS limits

JSON-RPC Error Codes

JSON-RPC errors appear in the response body when the RPC method encounters an issue. Syndica uses custom error codes in addition to standard Solana RPC errors.

Syndica Custom Error Codes

RPC CodeErrorDescriptionHow to Fix
7429Rate LimitedMethod-specific or namespace rate limit exceededCheck your rate limits and upgrade if needed
7700Invalid HeadersRequest headers are malformed or invalidVerify headers match Solana RPC documentation
7701Batch Size ExceededBatch request contains too many callsReduce batch size or upgrade your plan
7702Duplicate SubscriptionAttempting to create duplicate WebSocket subscriptionUse a different subscription or open a new connection
7703Subscription Limit ExceededMaximum subscriptions per connection reachedOpen another WebSocket connection or close unused subscriptions
info

Syndica's custom error codes (7xxx) provide more specific information than standard Solana errors, helping you diagnose and resolve issues faster.

Standard JSON-RPC Error Codes

Solana RPC also returns standard JSON-RPC 2.0 error codes:

RPC CodeErrorDescription
-32700Parse errorInvalid JSON
-32600Invalid RequestRequest format is incorrect
-32601Method not foundRequested method doesn't exist
-32602Invalid paramsMethod parameters are incorrect
-32603Internal errorServer-side processing error

See the Solana RPC documentation for a complete list of Solana-specific error codes.

Error Response Format

JSON-RPC errors follow this structure:

{
"jsonrpc": "2.0",
"error": {
"code": 7429,
"message": "Rate Limited",
"data": {}
},
"id": 1
}

Troubleshooting Tips

Why am I getting 401 Unauthorized errors?

Common causes:

  • API key is missing or incorrect
  • API key has been revoked
  • API key has expired (if custom expiration was set)

Solution: Generate a new API key from the API Keys page and update your application.

How do I handle rate limit (429) errors?

Best practices:

  1. Implement exponential backoff with jitter
  2. Cache responses when possible
  3. Use WebSocket subscriptions instead of polling
  4. Upgrade to a higher plan tier for increased limits

See Rate Limits documentation for current limits by plan.

What should I do when I get a 503 Service Unavailable error?

This indicates a temporary issue with Syndica's infrastructure:

  1. Check status.syndica.io for known issues
  2. Implement retry logic with exponential backoff
  3. If the issue persists, contact support
Why are my WebSocket subscriptions failing?

Common issues:

  • Reached maximum connections or subscriptions limit
  • Trying to create duplicate subscriptions on the same connection
  • Invalid subscription parameters

Solution: Review WebSocket limits and verify your subscription parameters.

How can I see error rates in my application?

Use Syndica's built-in monitoring:

  1. Navigate to Analytics in your dashboard
  2. View error breakdowns by status code and RPC error code
  3. Filter by time range to identify patterns
  4. Check Logs for detailed error messages

See Observability documentation for more details.

What You Can Do Next