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