classify_tool_error

Function classify_tool_error 

Source
fn classify_tool_error(tool_name: &str, err: Error) -> AppError
Expand description

Inspects tool execution errors and maps them to the most appropriate HTTP status code. This allows built-in tools to signal client errors (e.g. empty query → 400, document not found → 404) without needing a custom error type in the Tool trait.