class HTTP::Client::ProtocolError < HTTP::Client::Error

The response is not HTTP/1.x as it should be: a bad status line or header, bad framing, headers over max_header_bytes.

<std:http>:2128