Skip to main content
Validation and state errors are returned with clear messages and HTTP status codes. Treat 400s as actionable client fixes, 401s as authentication issues, 404s as missing resources, 409s as idempotency conflicts, and 500s as server problems worth logging with correlation ids on your side. Example validation error
cURL
curl -X POST "$BASE_URL/v2/portfolio-wallets/$WALLET_ID/withdraw" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ }'
400 response
{
  "error": "Missing required fields: destinationAddress, withdrawalAmount, destinationToken, destinationChain, requestId"
}
Example duplicate requestId
{
  "error": "Duplicate request ID",
  "details": "A resource was already created with this request ID"
}
When duplicates occur, fetch by id or requestId to obtain the original record rather than re-creating it. Log full server errors internally and present concise, user-friendly messages to end users.