File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,15 @@ export async function connectMCPClient(
4040 log . warning ( 'Connection to MCP server using SSE transport timed out' , { url, mcpSessionId } ) ;
4141 return null ;
4242 }
43- // External MCP server unavailability is operational, not a bug in our service
44- log . softFail ( 'Failed to connect to MCP server using SSE transport' , {
43+ // External MCP server unavailability is operational, not a bug.
44+ // Mezmo (logDNA) promotes log entries to errors when the message contains "error"
45+ // Sanitize the error message to preserve the soft-fail log level.
46+ const errMessage = ( error instanceof Error ? error . message : String ( error ) ) . replace ( / e r r o r : / gi, ' failure:' ) ;
47+ log . softFail ( 'MCP server unreachable' , {
4548 url,
4649 mcpSessionId,
4750 statusCode : getHttpStatusCode ( error ) ,
48- errMessage : error instanceof Error ? error . message : String ( error ) ,
51+ errMessage,
4952 } ) ;
5053 return null ;
5154 }
You can’t perform that action at this time.
0 commit comments