You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feat]: Revisit exception handling in DefaultRequestHandler.onMessageSend() #449
Stringmsg = String.format("Timeout waiting for consumption to complete for task %s", taskId);
LOGGER.warn(msg, taskId);
thrownewInternalError(msg);
we currently throw InternalError if InterruptedException, TimeoutException or ExecutionException happens.
We were originally just logging the errors, and passed review on main. But then on the 0.3.x backport PR, Gemini had a comment, which led us to adding these errors. However, this doesn't feel very correct.
We need to investigate these cases:
TimeoutException - this probably just means that the client timed out, and that the processing of the Task should happen in the background
ExecutionException - Possibly, this will be tracked by the handling in DefaultRequestHandler.registerAndExecuteAgentAsync()?
InterruptedException - I think this means the sever is shutting down. What does this mean for the Task?
Another thing to note is that with the current aggressive throwing of InternalError in all three cases, we won't invoke PushNotification callbacks
Activity
kabir commentedon Feb 12, 2026
We have rewritten a lot in this area (in #611 and similar PRs). So I think this is out of date