Skip to content

Misleading warning for progress callback exceptions #776

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lorenzocesconetto opened this issue May 21, 2025 · 1 comment
Open

Misleading warning for progress callback exceptions #776

lorenzocesconetto opened this issue May 21, 2025 · 1 comment

Comments

@lorenzocesconetto
Copy link

Describe the bug
Currently a misleading warning is logged when a progress callback raises an exception.
It states that it "Failed to validate notification".
I've already issued a PR to fix it: #775

To Reproduce

async def progress_cb(progress: float, total: float | None, message: str | None):
    raise RuntimeError("Cannot divide by zero.")

result = await self.session.call_tool(
                    tool_name,
                    arguments,
                    progress_callback=progress_cb,
                )

Expected behavior
Indicate to the developer that his callback threw an exception.

@ivanbelenky
Copy link

I have no saying in anything but your PR looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants