pub fn capture_error_with_scope(
err: &(dyn Error + 'static),
provider: &str,
operation_id: &str,
upstream_status: u16,
proxy_status: u16,
error_type: Option<&str>,
error_message: Option<&str>,
)Expand description
Attach the structured Rust error (with its full source() chain) to
the current Sentry scope and capture it as an exception event. This
is what gives the issue page a real “Exception” block with the
reqwest / HttpError / McpError source chain — without this, all
Sentry sees is the tracing-bridge’s flat title + tags.
Pair with report_upstream_error: that one creates the
titled/grouped issue, this one attaches the structured context.
When the sentry feature is off, this is a no-op.