-
Notifications
You must be signed in to change notification settings - Fork 0
Error Handling
Benmebrouk edited this page Apr 12, 2026
·
1 revision
use wauldo::Error;
match client.guard("test", "test", None).await {
Ok(r) => println!("{}", r.verdict),
Err(Error::Server { code, message, .. }) => eprintln!("[{code}]: {message}"),
Err(Error::Connection(msg)) => eprintln!("Connection: {msg}"),
Err(Error::Timeout(msg)) => eprintln!("Timeout: {msg}"),
Err(e) => eprintln!("{e}"),
}The SDK retries transient errors (429, 5xx) with exponential backoff.