vert.x icon indicating copy to clipboard operation
vert.x copied to clipboard

More specific exceptions for exceeded socket timeouts

Open noobgramming opened this issue 1 year ago • 1 comments

Describe the feature

It's common to get a Socket Closed exception when exceeding various timeouts (connection timeout, idle timeout, read timeout, write timeout). In my experience it can be frustrating to figure out where these errors are coming from because the stack trace is pruned for performance reasons. Can we switch these out for more specific exceptions to let users know why the socket was closed and what kind of socket timed out? Ex. SocketConnectionTimeoutException("Server Socket connection timed out after X seconds") and SocketIdleTimeoutException("Http Client Socket timed out from no read/write activity after X seconds")

Use cases

Help users debug cases where default timeouts aren't long enough for their use-cases. Or where timeouts have been improperly configured

Contribution

I may be able to implement this with some direction.

noobgramming avatar Apr 18 '23 21:04 noobgramming

I agree we should have better reporting, however I believe the error message should be enough rather than introducing a specific java class for every king of possible timeout.

vietj avatar May 10 '23 14:05 vietj