pub fn log_error(error: &ComposioError, context: Option<&str>)Expand description
Log an error with appropriate verbosity level
This function logs errors with context-aware formatting:
- For validation errors (400), uses detailed formatting
- For other errors, uses standard display
- Respects the current verbosity level
§Arguments
error- The error to logcontext- Optional context string (e.g., “Session creation”, “Tool execution”)
§Example
use composio_sdk::utils::logging::log_error;
use composio_sdk::error::ComposioError;
let error = ComposioError::ValidationError("Invalid input".to_string());
log_error(&error, Some("Creating session"));