Exceptions and Exit Codes
Turn failures into clear messages, non-zero exits, and recoverable control flow.
Logging for Humans and Machines
Write logs that support debugging, audits, monitoring, and AI/automation workflows.
Retries, Timeouts, and Cleanup
Handle flaky networks, subprocesses, APIs, and temporary resources safely.
Custom Exceptions
Create domain-specific exceptions that make failures easier to handle and test.
Structured Logging Context
Add useful context to logs without leaking secrets or overwhelming operators.