HEYQUANT / DOCUMENTATION
Error handling
Distinguish service responses, network failures and local file errors.
HTTP status errors
The client calls raise_for_status(), catches httpx.HTTPStatusError and raises HeyQuantError. The message contains the status code and any nonempty response body.
Network and timeouts
Network and timeout errors retain their httpx types. Handle them separately and avoid exposing potentially sensitive response details to other users.
import httpx
from heyquant import HeyQuantError
# Call this on your configured client
try:
result = client.list_datasets()
except HeyQuantError:
print("Service request failed")
except httpx.TimeoutException:
print("Request timed out")
except httpx.RequestError:
print("Network request failed")
Retries and files
The public SDK provides no application-level automatic retries or export idempotency mechanism. Do not blindly retry export creation. Applications must handle JSON parsing and local file errors. Interrupted downloads can leave partial files.