Rust
Delete organization
delete_organization
pub async fn delete_organization(organization_id: &str) -> Result<()>
Result<()>
use wacht::api::organizations::*; delete_organization("52057194421551105").await?; println!("Organization deleted successfully");
match delete_organization("52057194421551105").await { Ok(()) => { println!("Organization deleted successfully"); } Err(Error::Api { status, message, .. }) => { match status.as_u16() { 404 => println!("Organization not found"), 403 => println!("Access denied: {}", message), 409 => println!("Cannot delete organization with active members: {}", message), _ => println!("API error {}: {}", status, message), } } Err(e) => println!("Request failed: {}", e), }