Skip to content

add warning logs for silent failures in RPC message handling#92

Merged
benbrandt merged 1 commit intoagentclientprotocol:mainfrom
anaslimem:silent-error-handling-in-rpc
Mar 28, 2026
Merged

add warning logs for silent failures in RPC message handling#92
benbrandt merged 1 commit intoagentclientprotocol:mainfrom
anaslimem:silent-error-handling-in-rpc

Conversation

@anaslimem
Copy link
Copy Markdown
Contributor

Summary

This PR adds warning logs for previously silent error cases in the RPC layer where message sending failures were being swallowed with .ok().

Changes

Added proper error logging in 4 locations:

  1. TCP send failures - When sending messages to peer fails (e.g., peer disconnected)
  2. Request channel full - When handler can't keep up with incoming requests
  3. Error response send failures - When sending error responses back to peer fails
  4. Notification channel full - When handler can't keep up with notifications

Why

Previously, when these operations failed (e.g., peer disconnected, channel buffer full), the errors were silently ignored with .ok().

Now, when these failures occur, you'll see warnings like:

  • failed to send message to peer: Broken pipe
  • failed to send request to handler, channel full
  • failed to send notification to handler, channel full

@benbrandt benbrandt enabled auto-merge (squash) March 28, 2026 11:30
@benbrandt benbrandt disabled auto-merge March 28, 2026 11:30
@benbrandt benbrandt enabled auto-merge (squash) March 28, 2026 11:30
@benbrandt benbrandt disabled auto-merge March 28, 2026 11:30
@benbrandt benbrandt merged commit 9945be2 into agentclientprotocol:main Mar 28, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants