Skip to main content
This guide covers all aspects of error handling when working with the DRIP API, including common error scenarios, proper error handling techniques, and troubleshooting steps.

Error Response Format

All DRIP API errors follow a consistent format:

Error Response Fields

HTTP Status Codes

The DRIP API uses standard HTTP status codes:

2xx Success

  • 200 OK: Request successful
  • 201 Created: Resource created successfully
  • 204 No Content: Request successful, no response body

4xx Client Errors

  • 400 Bad Request: Invalid request format or parameters
  • 401 Unauthorized: Missing or invalid authentication
  • 403 Forbidden: Valid authentication but insufficient permissions
  • 404 Not Found: Requested resource doesn’t exist
  • 409 Conflict: Request conflicts with current resource state
  • 422 Unprocessable Entity: Valid format but business logic error
  • 429 Too Many Requests: Rate limit exceeded

5xx Server Errors

  • 500 Internal Server Error: Unexpected server error
  • 502 Bad Gateway: Upstream service error
  • 503 Service Unavailable: Temporary service outage
  • 504 Gateway Timeout: Upstream service timeout

Common Error Types

Authentication Errors

Causes:
  • API key is incorrect or malformed
  • API key has been revoked
  • Missing Authorization header
Solutions:
  • Verify your API key is correct
  • Generate a new API key if needed
  • Ensure proper header format: Authorization: Bearer YOUR_KEY
Causes:
  • API key lacks required permissions
  • Trying to access another realm’s resources
  • Account permissions have been changed
Solutions:
  • Check your account permissions in the dashboard
  • Ensure you’re using the correct realm ID
  • Contact an admin to update permissions

Validation Errors

Common Issues:
  • Invalid data types (string instead of number)
  • Missing required fields
  • Values outside allowed ranges
  • Malformed IDs
Solutions:
  • Validate input data before sending requests
  • Check API documentation for required fields and formats
  • Use proper data types in your requests
Common Scenarios:
  • Insufficient point balance for transfers
  • Duplicate resource creation
  • Quest already completed
  • Store item out of stock
Solutions:
  • Check resource state before operations
  • Implement proper business logic validation
  • Handle edge cases gracefully

Resource Errors

Common Causes:
  • Incorrect resource IDs
  • Resource has been deleted
  • Member hasn’t joined the realm
  • Typos in endpoint URLs
Solutions:
  • Verify resource IDs are correct
  • Check if resources exist before operations
  • Handle missing resources gracefully
Common Scenarios:
  • Modifying completed quests
  • Creating duplicate resources
  • Concurrent modification conflicts
Solutions:
  • Check resource state before modifications
  • Implement proper concurrency handling
  • Use appropriate HTTP methods (PUT vs PATCH)

Rate Limiting Errors

Solutions:
  • Implement exponential backoff
  • Respect the Retry-After header
  • Use batch operations when possible
  • See the Rate Limits guide for details

Error Handling Implementation

JavaScript/Node.js

Python

Debugging and Troubleshooting

Request ID Tracking

Always log the requestId from error responses for support:

Common Debugging Steps

1

Verify API Key

Test your API key with a simple request:
2

Check Request Format

Ensure your request matches the API documentation:
  • Correct HTTP method
  • Proper JSON format
  • Required headers included
  • Valid parameter types
3

Validate Resource IDs

Confirm that all IDs in your request are valid:
  • Realm ID exists and you have access
  • Member ID exists in the realm
  • Point type ID is correct
4

Test with cURL

Replicate the failing request with cURL to isolate the issue:

Error Monitoring

Set up monitoring to track error patterns:

Best Practices

Graceful Degradation

  • Always handle errors gracefully
  • Provide meaningful user feedback
  • Implement fallback behaviors
  • Log errors for debugging

Retry Logic

  • Implement exponential backoff
  • Don’t retry client errors (4xx)
  • Respect rate limit headers
  • Set maximum retry limits

Error Logging

  • Log all API errors with context
  • Include request IDs for support
  • Monitor error patterns
  • Set up alerting for high error rates

User Experience

  • Show user-friendly error messages
  • Provide actionable next steps
  • Handle loading and error states
  • Implement proper error boundaries

Getting Help

When contacting support about API errors:
  1. Include the Request ID from the error response
  2. Provide the full error response with status code
  3. Share your request details (without sensitive data)
  4. Describe the expected behavior vs what happened
  5. Include relevant logs and timestamps

Discord Support

Join our community for help and discussions

API Reference

Check the complete API documentation