Exception: Traject::SolrJsonWriter::BadHttpResponse
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Traject::SolrJsonWriter::BadHttpResponse
- Defined in:
- lib/traject/solr_json_writer.rb
Overview
Adapted from HTTPClient::BadResponseError. It's got a #response accessor that will give you the HTTPClient Response object that had a bad status, although relying on that would tie you to our HTTPClient implementation that maybe should be considered an implementation detail, so I dunno.
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
HTTP::Message:: a response.
Instance Method Summary collapse
-
#initialize(msg, response = nil) ⇒ BadHttpResponse
constructor
:nodoc:.
Constructor Details
#initialize(msg, response = nil) ⇒ BadHttpResponse
:nodoc:
445 446 447 448 449 450 451 452 |
# File 'lib/traject/solr_json_writer.rb', line 445 def initialize(msg, response = nil) # :nodoc: solr_error = find_solr_error(response) msg += ": #{solr_error}" if solr_error super(msg) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
HTTP::Message:: a response
443 444 445 |
# File 'lib/traject/solr_json_writer.rb', line 443 def response @response end |