Error returned by Caracola.Parser.parse/2.
reasonis:invalid_messagewhen the start line or the header block cannot be parsed at all, or{:invalid, header}when a known header is invalid (headeris its canonical name, like"Via"or"Content-Length").classandheadersare the start line and raw headers, if they could be parsed. For requests they are enough to build a400 Invalid <header>response withCaracola.Serializer.error_response/1.
Summary
Types
@type t() :: %Caracola.ParseError{ __exception__: term(), class: {:req, Caracola.Message.method(), String.t()} | {:resp, String.t(), String.t()} | nil, headers: [{String.t(), String.t()}], reason: :invalid_message | {:invalid, String.t()} }
A parse error: the reason, the class of the message when it could be read, and the headers needed to answer it.