Skip to main content

SDK Exception Hierarchy

Every exception raised by the SDK inherits from ValiqorError, so you can catch all SDK errors in one place.

Full hierarchy


Common Errors and Resolutions

AuthenticationError

HTTP status: 401 or 403

AccountDeactivatedError

HTTP status: 403 Your account has been deactivated by an administrator. Contact support or visit app.valiqor.com/account.

RateLimitError

HTTP status: 429 Too many requests in a short window. The SDK provides a retry_after attribute.
See Rate Limits for exact limits.

QuotaExceededError

HTTP status: 429 (quota exceeded) or 403 (trial expired) Your monthly API call quota has been used up.
Resolutions:
  • Check usage with client.get_usage() or valiqor status
  • Upgrade your plan for a higher quota
  • If you see "Verify your email to unlock 50 free runs", run valiqor verify

TokenQuotaExceededError

HTTP status: 429 Monthly LLM token quota exceeded. Same as QuotaExceededError but with token-specific attributes.

ValidationError

HTTP status: 400 Invalid request parameters or dataset format.

DatasetTooLargeError

HTTP status: 400 Dataset exceeds the maximum size limit (1,000 items per request).
Resolution: Split your dataset into batches.

TimeoutError

Request took longer than the 300-second (5-minute) default timeout. Resolutions:
  • Use async mode for large datasets: client.eval.evaluate_async(...) or client.failure_analysis.run_async(...)
  • Reduce dataset size

NetworkError

Cannot reach the Valiqor backend.

UploadError

File upload failed (subclass of NetworkError).

ServiceUnavailableError

HTTP status: 503 The backend is temporarily overloaded. The SDK automatically retries once after a short delay. If the retry also fails, this error is raised.

APIError

HTTP status: 500+ (generic server error) An unexpected backend error. Includes status_code and response attributes for debugging.

Module-Specific Errors

TracingError

Raised when tracing operations fail (e.g. malformed trace data, span nesting issues).

ScanError

Raised when scanner operations fail (e.g. repository path doesn’t exist).

EvaluationError

Raised for evaluation-specific failures.

SecurityError

Raised for security audit or red team failures.

Module Not Installed

Each SDK module is lazily loaded. If a module fails to load, you’ll see an ImportError: All modules are included in the base package:

CLI Issues

Login fails

Configuration problems

Upload fails


Auto-Retry Behaviour

The SDK automatically retries in one scenario: All other error status codes raise immediately with no automatic retry.