Skip to content

fix: handle asyncio.CancelledError in metrics try/except blocks#5336

Open
gyliu513 wants to merge 1 commit intollamastack:mainfrom
gyliu513:cancel
Open

fix: handle asyncio.CancelledError in metrics try/except blocks#5336
gyliu513 wants to merge 1 commit intollamastack:mainfrom
gyliu513:cancel

Conversation

@gyliu513
Copy link
Copy Markdown
Contributor

What does this PR do?

Add except asyncio.CancelledError handlers before except Exception in all metrics-recording try/except blocks in vector_io.py and tool_runtime.py. This ensures disconnected/cancelled requests are still recorded as errors in metrics, matching the pattern already established in metrics.py

This is a follow up to addresses review feedback from #5201 (comment) for other metrics.

@leseb ^^

Test Plan

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant