Skip to main content

Error Handling

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

Error Format

The WASM SDK throws standard JavaScript Error objects:

Common Error Messages

Basic Error Handling

Retry Pattern

For network errors, use exponential backoff:

User-Friendly Error Messages

Best Practices

1. Always Catch Errors

Every SDK call should be wrapped in try/catch:

2. Log Errors for Debugging

3. Handle Network Errors with Retry

Network errors are transient. Always offer a retry option or use automatic retry with backoff.

Next Steps