Class: Foam::Otel::LLM::HttpAnthropicShim::FailingBodyStream

Inherits:
Object
  • Object
show all
Defined in:
lib/foam/otel/llm/http_anthropic_shim.rb

Overview

Re-raises the transport error foam swallowed mid-capture, so the app's own read fails with the REAL exception class and message.

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ FailingBodyStream

Returns a new instance of FailingBodyStream.



235
236
237
# File 'lib/foam/otel/llm/http_anthropic_shim.rb', line 235

def initialize(error)
  @error = error
end

Instance Method Details

#readpartial(*_args) ⇒ Object

Raises:

  • (@error)


239
240
241
# File 'lib/foam/otel/llm/http_anthropic_shim.rb', line 239

def readpartial(*_args)
  raise @error
end