
Docs
Version 1.0.0
DataWise Document Exchange
API v1.0.0
Error Handling
When an error occurs, the API returns a JSON response with the following structure:
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error description",
"details": {
"field": "fieldName",
"additionalInfo": "..."
},
"correlationId": "a1b2c3d4e5f6",
"timestamp": "2025-10-08T10:30:00.000Z"
}
}
Response Headers:
X-Correlation-Id: a1b2c3d4e5f6
Content-Type: application/jsoncode: Machine-readable error code for programmatic handling
message: Detailed description of the error
details: Additional error-specific information (optional)
correlationId: Unique identifier for tracking this error (12 characters)
timestamp: ISO 8601 timestamp when the error occurred
| Error Code | HTTP Status | Message | Solution |
|---|---|---|---|
| AUTH_NO_API_KEY | 401 | Unauthorized!! No api key provided | Include the Authorization header with your API key |
| AUTH_INVALID_API_KEY | 401 | Unauthorized!! Invalid api key | Verify your API key is correct and has not been regenerated |
| AUTH_APP_NOT_ACTIVE | 403 | Unauthorized!! App is not active | Check your application status in the dashboard and ensure it is active |
try {
const response = await fetch(url, options);
const data = await response.json();
if (!response.ok && data.error) {
// Save correlation ID for debugging
const correlationId = data.error.correlationId;
console.error('Error:', correlationId, data.error.message);
switch(data.error.code) {
case 'AUTH_NO_API_KEY':
// Handle missing API key
break;
case 'PAYMENT_INSUFFICIENT_FUNDS':
// Alert user to add funds
const { balance, required } = data.error.details;
break;
// Add other validation error handling here
default:
// Generic error handling with correlation ID
alert(`Error: ${data.error.message}\nID: ${correlationId}`);
}
}
} catch (error) {
// Network or parsing error
console.error('Request failed:', error);
}async function apiCallWithRetry(
url, options, maxRetries = 3
) {
for (let i = 0; i < maxRetries; i++) {
try {
const response = await fetch(url, options);
// Retry on server errors and rate limits
if (response.status === 429 ||
response.status === 503 ||
response.status === 504) {
if (i < maxRetries - 1) {
// Wait with exponential backoff before retry
await new Promise(r =>
setTimeout(r, 1000 * Math.pow(2, i))
);
continue;
}
// Last attempt, return error response
return await response.json();
}
return await response.json();
} catch (error) {
if (i === maxRetries - 1) throw error;
}
}
}Save the Correlation ID
Every error includes a unique correlationId. Save this when contacting support to help us quickly locate the exact error in our logs.
Validate JSON
Ensure JSON parameters like ddxE_signers and #loops are properly formatted
Test with Preview Mode
Use ddxE_signPreview=true to test e-signature flow without sending emails
Monitor Dashboard Logs
Check your application logs in the dashboard for detailed error information
Use Minimal Test Case
Start with a simple template and gradually add complexity to isolate issues
Need Additional Help?
© Copyright 2026, Datawise Document Exchange.