class Turbopuffer::Internal::Transport::BaseClient

def reap_connection!(status, stream:)

Parameters:
  • stream (Enumerable, nil) --
  • status (Integer, Turbopuffer::Errors::APIConnectionError) --

Other tags:
    Api: - private
def reap_connection!(status, stream:)
  case status
  in (..199) | (300..499)
    stream&.each { next }
  in Turbopuffer::Errors::APIConnectionError | (500..)
    Turbopuffer::Internal::Util.close_fused!(stream)
  else
  end
end