fix(msteams): add fetch timeout to Microsoft Graph API calls#47860
fix(msteams): add fetch timeout to Microsoft Graph API calls#47860hclsys wants to merge 1 commit intoopenclaw:mainfrom
Conversation
fetchGraphJson() had no timeout, so a hanging Microsoft Graph endpoint would stall the entire MS Teams extension indefinitely. Add a 30-second AbortSignal.timeout and wrap the fetch in a try/catch that preserves the cause chain. Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: HCL <[email protected]>
Greptile SummaryThis PR adds a 30-second Key observations:
Confidence Score: 4/5
|
Resolved: - openclaw#25790 (Teams issue, CLOSED) - openclaw#47860 (Teams PR, CLOSED) - openclaw#48116 (Azure issue, CLOSED) - openclaw#48899 (Azure issue, CLOSED) - openclaw#47898 (Azure PR, MERGED) - openclaw#17970 (Azure PR, CLOSED) - openclaw#21678 (Windows issue, CLOSED)
lobster-biscuit
Problem
fetchGraphJson()in the MS Teams extension calls the Microsoft Graph API without any timeout. If the Graph endpoint hangs or is slow to respond, the entire extension stalls indefinitely.Solution
Add a 30-second
AbortSignal.timeoutto the centralfetchGraphJson()wrapper. This single change protects every Graph API call in the MS Teams extension (list teams, list channels, etc.).The fetch is wrapped in a try/catch that preserves the cause chain via
{ cause: err }. The existing!res.okerror path already uses.catch(() => "")on the body read, so no change needed there.Changes
extensions/msteams/src/graph.ts— addAbortSignal.timeout(30_000)to fetch + try/catch wrapperTest plan
🤖 Generated with Claude Code