Skip to content

Commit a12bac5

Browse files
committed
diag(mcp): include error name/code in transport failure log
Distinguishes abort vs connect-refused vs TLS vs timeout in the failure-phase data.
1 parent 980a6fe commit a12bac5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

apps/sim/lib/mcp/pinned-fetch.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,14 @@ export function createPinnedMcpFetch(resolvedIP: string): PinnedMcpFetch {
5353
})
5454
return response
5555
} catch (error) {
56+
const e = error as { name?: string; code?: string; cause?: { name?: string; code?: string } }
5657
transportLogger.warn('MCP transport request failed', {
5758
host,
5859
method,
5960
ms: Date.now() - startedAt,
61+
errorName: e?.name,
62+
errorCode: e?.code ?? e?.cause?.code,
63+
causeName: e?.cause?.name,
6064
})
6165
throw error
6266
}

0 commit comments

Comments
 (0)