Skip to main content

Error Handling

This guide covers error handling patterns for the Privacy Boost CLI. For the cross-platform error code reference, see Error Handling.

CliError

All SDK operations return Result<T, CliError>:

Basic Error Handling

CLI Error Messages

Common CLI error outputs:

Retry Pattern

For network errors, use a retry loop:

Categorizing Errors

User-Friendly Error Messages

Best Practices

1. Always Match on Specific Errors

2. Log Errors for Debugging

3. Handle Network Errors with Retry

Network errors are transient. Use the retry pattern for automated scripts.

Next Steps