Skip to main content

Error Reference

All AxonVault API errors follow a consistent format and use standard HTTP status codes.

Error Response Format

{
  "errorType": "error_code",
  "errorMessage": "Human-readable description"
}

HTTP Status Codes

CodeCategoryDescription
2xxSuccessRequest completed successfully
4xxClient ErrorProblem with the request
5xxServer ErrorProblem on our side
5xx errors: The operation status is unknown. The request may have succeeded on our backend. Implement idempotency for critical operations.

HTTP 400 - Bad Request

invalid_request

Request is malformed or missing required fields.
{
  "errorType": "invalid_request",
  "errorMessage": "Missing required field: walletName"
}
Resolution:
  • Check all required fields are present
  • Verify request body matches the schema
  • Validate parameter formats

malformed_transaction

Transaction data is invalid.
{
  "errorType": "malformed_transaction",
  "errorMessage": "Invalid RLP encoding"
}
Resolution:
  • Verify transaction encoding (RLP for EVM, base64 for Solana)
  • Check all transaction fields are valid
  • Ensure correct chain format

invalid_signature

Signature verification failed.
{
  "errorType": "invalid_signature",
  "errorMessage": "Signature does not match transaction hash"
}
Resolution:
  • Verify signing with correct key
  • Check transaction wasn’t modified after signing
  • Ensure correct network/chain ID

invalid_address

Address format is invalid.
{
  "errorType": "invalid_address",
  "errorMessage": "Invalid Ethereum address format"
}
Resolution:
  • Check address checksum (EVM)
  • Verify address length
  • Ensure correct chain format

HTTP 401 - Unauthorized

unauthorized

Authentication failed.
{
  "errorType": "unauthorized",
  "errorMessage": "Invalid API key"
}
Resolution:
  • Verify API key is correct
  • Check signature calculation
  • Ensure timestamp is within 5 minutes

token_expired

JWT token has expired.
{
  "errorType": "token_expired",
  "errorMessage": "Access token expired"
}
Resolution:
  • Refresh the access token
  • Re-authenticate if refresh fails

signature_mismatch

HMAC signature doesn’t match.
{
  "errorType": "signature_mismatch",
  "errorMessage": "Request signature verification failed"
}
Resolution:
  • Verify canonical string format
  • Check secret key is correct
  • Ensure body matches exactly

wallet_auth_required

Wallet authorization needed for signing.
{
  "errorType": "wallet_auth_required",
  "errorMessage": "Wallet Auth Token required for signing operations"
}
Resolution:
  • Include X-Wallet-Auth header
  • Generate valid wallet auth token

HTTP 403 - Forbidden

forbidden

Insufficient permissions.
{
  "errorType": "forbidden",
  "errorMessage": "API key does not have permission for this operation"
}
Resolution:
  • Check API key permissions
  • Verify resource ownership
  • Contact admin for access

policy_denied

Transaction blocked by policy.
{
  "errorType": "policy_denied",
  "errorMessage": "Transaction exceeds daily limit"
}
Resolution:
  • Review applicable policies
  • Request approval if available
  • Adjust transaction parameters

HTTP 404 - Not Found

not_found

Resource doesn’t exist.
{
  "errorType": "not_found",
  "errorMessage": "Wallet not found"
}
Resolution:
  • Verify resource ID is correct
  • Check resource wasn’t deleted
  • Ensure correct project/tenant

HTTP 409 - Conflict

already_exists

Resource already exists.
{
  "errorType": "already_exists",
  "errorMessage": "Wallet with this name already exists"
}
Resolution:
  • Use a different name/identifier
  • Check if resource can be reused

idempotency_error

Idempotency key reused with different parameters.
{
  "errorType": "idempotency_error",
  "errorMessage": "Idempotency key was used with different request body"
}
Resolution:
  • Generate new idempotency key
  • Only reuse keys for identical requests

HTTP 429 - Rate Limited

rate_limit_exceeded

Too many requests.
{
  "errorType": "rate_limit_exceeded",
  "errorMessage": "Rate limit exceeded. Retry after 60 seconds."
}
Resolution:
  • Implement exponential backoff
  • Cache responses where possible
  • Contact support for limit increase

HTTP 500 - Internal Server Error

internal_server_error

Unexpected server error.
{
  "errorType": "internal_server_error",
  "errorMessage": "An unexpected error occurred"
}
Resolution:
  • Retry with exponential backoff
  • Contact support if persistent
  • Check status page

HTTP 502 - Bad Gateway

bad_gateway

Backend service unavailable.
{
  "errorType": "bad_gateway",
  "errorMessage": "Unable to connect to signing service"
}
Resolution:
  • Retry after short delay
  • Check status page
  • Contact support if persistent

HTTP 503 - Service Unavailable

service_unavailable

Service temporarily unavailable.
{
  "errorType": "service_unavailable",
  "errorMessage": "Service is under maintenance"
}
Resolution:
  • Wait and retry
  • Check status page for updates

HTTP 504 - Gateway Timeout

timed_out

Request took too long.
{
  "errorType": "timed_out",
  "errorMessage": "Request timed out"
}
Resolution:
  • Retry with exponential backoff
  • Simplify request if possible
  • Check operation status before retrying

Error Handling Best Practices

async function withRetry(fn, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    try {
      return await fn();
    } catch (error) {
      if (error.status >= 500 || error.status === 429) {
        const delay = Math.pow(2, i) * 1000;
        await new Promise(r => setTimeout(r, delay));
        continue;
      }
      throw error;
    }
  }
  throw new Error('Max retries exceeded');
}
import { v4 as uuidv4 } from 'uuid';

// Generate unique key per logical operation
const idempotencyKey = uuidv4();

const response = await fetch(url, {
  headers: {
    'X-Idempotency-Key': idempotencyKey,
    ...otherHeaders
  }
});
function logError(error, context) {
  console.error({
    errorType: error.errorType,
    errorMessage: error.errorMessage,
    status: error.status,
    requestId: error.headers?.['x-request-id'],
    timestamp: new Date().toISOString(),
    ...context
  });
}