Error Handling
The Renesis Stellar DEX Vaults API uses conventional HTTP response codes to indicate the success or failure of API requests. All error responses follow a consistent structure to provide clear information about what went wrong and how to fix it.Error Response Format
All API errors return a standardized JSON response structure:Response Fields
- success (boolean): Always
falsefor error responses - message (string): General error description explaining what went wrong
- errors (array, optional): Detailed field-specific validation errors
- field (string): Name of the field that caused the error
- message (string): Specific error message for this field
- value (any, optional): The invalid value that was provided
HTTP Status Codes
The API uses standard HTTP status codes to indicate different types of errors:200 OK
Request succeeded. The response body contains the requested data.201 Created
Resource was successfully created. The response body contains the new resource data.400 Bad Request
The request was invalid due to malformed syntax, invalid parameters, or validation errors.Common Causes:
- Invalid request body format
- Missing required fields
- Invalid field values
- Malformed JSON
- Invalid query parameters
Example Response:
Validation Error Examples:
Invalid Vault Name401 Unauthorized
Authentication failed. The request lacks valid authentication credentials.Common Causes:
- Missing Authorization header
- Invalid API key
- Expired API key
- Malformed Authorization header
Example Response:
Authentication Error Examples:
Missing API Key404 Not Found
The requested resource could not be found.Common Causes:
- Invalid vault ID
- Vault doesn’t exist
- Invalid endpoint URL
- Resource was deleted
Example Response:
Not Found Error Examples:
Vault Not Found by ID409 Conflict
The request conflicts with the current state of the resource.Common Causes:
- Duplicate vault address
- Resource already exists
- Conflicting state changes
Example Response:
Conflict Error Examples:
Duplicate Vault Address429 Too Many Requests
Rate limit exceeded. The client has sent too many requests in a given time period.Rate Limiting Details:
- Window: 15 minutes (900,000 ms)
- Limit: 100 requests per window per API key
- Reset: Automatic after window expires
Example Response:
Rate Limit Headers:
All responses include rate limiting information in headers:X-RateLimit-Limit: Maximum requests allowed per windowX-RateLimit-Remaining: Remaining requests in current windowX-RateLimit-Reset: Timestamp when the rate limit window resetsRetry-After: Seconds to wait before retrying (only on 429 responses)
Rate Limit Error Examples:
Standard Rate Limit Exceeded500 Internal Server Error
An unexpected error occurred on the server.Common Causes:
- Database connection issues
- Stellar network connectivity problems
- Unexpected server errors
- Third-party service failures
Example Response:
Internal Error Examples:
Database Connection ErrorCommon Error Scenarios
Validation Errors
Invalid Field Types
Missing Required Fields
Field Length Violations
Authentication Errors
Missing Authorization Header
Malformed Authorization Header
Resource Not Found Errors
Invalid Vault ID
Vault Not Found
Rate Limiting Errors
Rate Limit Exceeded
When you exceed 100 requests in 15 minutes: Response:Troubleshooting Guide
Common Issues and Solutions
1. Authentication Problems
Issue: Getting 401 Unauthorized errors Solutions:- Verify your API key is correct
- Ensure you’re using the
Bearerprefix:Authorization: Bearer YOUR_API_KEY - Check that your API key hasn’t expired
- Regenerate your API key if necessary
2. Validation Errors
Issue: Getting 400 Bad Request with validation errors Solutions:- Check all required fields are provided
- Verify field types match the expected format
- Ensure Stellar addresses are valid (56 characters, correct prefix)
- Validate numeric ranges (e.g., maxTradeSize: 0-100)
- Vault Name: 2-100 characters, string
- Vault Owner: Stellar address starting with ‘G’, 56 characters
- Vault Address: Stellar contract address starting with ‘C’, 56 characters
- Max Trade Size: Number between 0-100
- Daily Trade Limit: Positive integer
- Slippage Tolerance: Number between 0-100
3. Rate Limiting Issues
Issue: Getting 429 Too Many Requests Solutions:- Implement exponential backoff in your retry logic
- Respect the
Retry-Afterheader value - Monitor rate limit headers to avoid hitting limits
- Consider caching responses to reduce API calls
4. Resource Not Found
Issue: Getting 404 Not Found errors Solutions:- Verify the resource ID is correct
- Check that the resource hasn’t been deleted
- Ensure you’re using the correct endpoint URL
- Confirm you have access to the requested resource
5. Duplicate Resource Conflicts
Issue: Getting 409 Conflict errors Solutions:- Check if a vault with the same address already exists
- Use unique vault addresses for each vault
- Consider updating existing resources instead of creating new ones
6. Server Errors
Issue: Getting 500 Internal Server Error Solutions:- Wait a few moments and retry the request
- Check the API status page for known issues
- Contact support if the problem persists
- Implement retry logic with exponential backoff
Error Handling Best Practices
1. Implement Proper Error Handling
2. Validate Data Before Sending
3. Monitor Rate Limits
4. Implement Retry Logic
Error Response Examples by Endpoint
Vault Creation Errors
POST /api/vaultsVault Retrieval Errors
GET /api/vaults/:idVault Update Errors
PUT /api/vaults/:idSearch and Filtering Errors
GET /api/vaultsSupport and Contact
If you encounter persistent errors or need additional help:- Check API Status: Visit our status page for known issues
- Review Documentation: Ensure you’re following the correct API patterns
- Contact Support: Reach out to our support team with:
- Error response details
- Request details (without sensitive data)
- Timestamp of the error
- Your API key ID (not the full key)
Support Channels
- Email: support@renesis.fi
- Documentation: API Documentation
- Status Page: status.renesis.fi

