class

HTTP2::InvalidRequestError

Inherits HTTP2::HTTPError < Exception < Reference < Object

A caller-supplied request could not be sent as given: an invalid method token, a disallowed or malformed header or pseudo-header, a content-length that disagrees with the request's actual or declared body length, or an invalid request target. Raised synchronously from Client#get/#post/#request/#head while preparing the request — except a streamed IO body whose length turns out not to match its declared content-length, which this same error instead reports mid-request, once the mismatch is discovered. Always a caller usage error, never a sign of a protocol or network failure.