Skip to main content

API Validation Errors

Cause: The provided address doesn’t have an associated policy on the specified chainID.Solutions:
  • Verify the to address has a policy configured in the Predicate dashboard
  • Ensure you’re using a supported chain ID
Example Error:
request validation failed: failed to get policy ID for address 0xa88274BD794c60B2F6FED3b471044c091Aea04E1
Cause: Request is missing mandatory transaction fields (from, to, data, msg_value).Solution: Include all required fields in your request:
{
  "from": "0x1234567890123456789012345678901234567890",
  "to": "0x1234567890123456789012345678901234567890", 
  "data": "0x",
  "msg_value": "0"
}
Example Error: Missing required field: from
Cause: The specified chain ID is not supported by your configuration.Solutions:
  • Use a supported chain ID (check your dashboard for available chains)
  • Contact support to add chain support
  • Verify chain configuration in your environment
Example Error: unsupported chain ID 999

HTTP Status Errors

Cause: API key is missing, invalid, or expired.Solutions:
  • Include API key in request header: x-api-key: YOUR_API_KEY
  • Verify API key is active in the Predicate dashboard
  • Regenerate API key if needed
  • Check for typos in the API key
Headers Example:
curl -H "x-api-key: YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     https://api.predicate.io/v1/task
Cause: Transaction validation took longer than 25 seconds.Solutions:
  • Retry the request with exponential backoff
  • Contact support if timeouts persist
Retry Logic Example:
const retryWithBackoff = async (fn, maxRetries = 3) => {
  for (let i = 0; i < maxRetries; i++) {
    try {
      return await fn();
    } catch (error) {
      if (error.status === 408 && i < maxRetries - 1) {
        await new Promise(resolve => setTimeout(resolve, Math.pow(2, i) * 1000));
        continue;
      }
      throw error;
    }
  }
};
Cause: Too many requests in a short time period.Solutions:
  • Implement exponential backoff in your retry logic
  • Review your rate limits in the dashboard
  • Consider upgrading your plan for higher limits (contact support)

Integration Errors

Cause: Attestation signature or format is incorrect for smart contract verification.Solutions:
  • Validate signature encoding is correct (most likely culprit)
  • Ensure you’re using the latest PredicateClient.sol
  • Verify the request to Predicate API matches the encoding on the application Contract
I