diff --git a/lib/async/http/protocol/http1/server.rb b/lib/async/http/protocol/http1/server.rb index 2ebf1ca..1c0e45f 100644 --- a/lib/async/http/protocol/http1/server.rb +++ b/lib/async/http/protocol/http1/server.rb @@ -52,7 +52,7 @@ def next_request end return request - rescue ::Protocol::HTTP1::BadRequest => error + rescue ::Protocol::HTTP1::BadRequest fail_request(400) # Conceivably we could retry here, but we don't really know how bad the error is, so it's better to just fail: raise diff --git a/lib/async/http/protocol/http2/connection.rb b/lib/async/http/protocol/http2/connection.rb index e2c2876..1e84d23 100644 --- a/lib/async/http/protocol/http2/connection.rb +++ b/lib/async/http/protocol/http2/connection.rb @@ -94,7 +94,7 @@ def read_in_background(parent: Task.current) # Error is raised if a response is actively reading from the # connection. The connection is silently closed if GOAWAY is # received outside the request/response cycle. - rescue SocketError, IOError, EOFError, Errno::ECONNRESET, Errno::EPIPE => ignored_error + rescue SocketError, IOError, EOFError, Errno::ECONNRESET, Errno::EPIPE # Ignore. rescue => error # Every other error.