By default, the SDK will never crash your application if the axonpush API is unreachable. Connection failures (DNS errors, timeouts, refused connections) are caught and logged as warnings. Methods return None for single results or [] for lists.
This means axonpush is safe to add to any production application — if the API goes down, your app keeps running.
# Default: fail_open=True — connection errors are suppressed
result = client.events.publish(...) # returns None if API is unreachable
events = client.events.list(1) # returns [] if API is unreachable
All framework integrations (LangChain, Anthropic, OpenAI Agents, CrewAI, Deep Agents) always suppress errors regardless of this setting — observability callbacks will never break your AI pipeline.
Strict mode
Set fail_open=False to raise APIConnectionError on connection failures. Useful for debugging, tests, or health checks.
from axonpush import AxonPush
from axonpush.exceptions import APIConnectionError
client =AxonPush(
api_key="ak_...",tenant_id="1",
base_url="https://api.axonpush.xyz",
fail_open=False,
)
try:
client.events.publish(...)
except APIConnectionError as e:
print(f"Cannot reach axonpush: {e}")
[!TIP]
Logging
Suppressed errors are logged via Python’s logging module under the "axonpush" logger. To see them: