Exception: HermesAgent::Client::MalformedResponseError

Inherits:
Error
  • Object
show all
Defined in:
lib/hermes_agent/client/errors.rb

Overview

Raised when the server returns a body the client expected to be JSON but could not parse — a malformed payload on an otherwise successful response, or a malformed streamed SSE frame. Distinct from APIError: the HTTP request itself succeeded; only the body was unparseable. The unparseable text is available as #body, and the underlying JSON::ParserError is preserved as the exception's #cause.

Instance Attribute Summary collapse

Instance Attribute Details

#bodyString? (readonly)

The raw text that could not be parsed.

Returns:

  • (String, nil)


52
53
54
# File 'lib/hermes_agent/client/errors.rb', line 52

def body
  @body
end