Skip to content

No mechanism on MCP and LangChain exceptions #5242

@alexander-alderman-webb

Description

See

except Exception as e:
# Set error flag for tools
if handler_type == "tool":
span.set_data(SPANDATA.MCP_TOOL_RESULT_IS_ERROR, True)
sentry_sdk.capture_exception(e)
raise

and

def _handle_error(self, run_id: "UUID", error: "Any") -> None:
with capture_internal_exceptions():
if not run_id or run_id not in self.span_map:
return
span_data = self.span_map[run_id]
span = span_data.span
set_span_errored(span)
sentry_sdk.capture_exception(error, span.scope)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions