Sha256: a9abf16d2d1efb63a1d0316ed96b12cc218af23bef7beac0039cecb252af7cff

Contents?: true

Size: 634 Bytes

Versions: 3

Compression:

Stored size: 634 Bytes

Contents

require 'api_error'

class ApiRequestFailure < ApiError

  def initialize(subject, tags, response, data = {})
    super(subject, tags, data.merge({
                                        api_response: {
                                            status: response.code + ' ' + response.message,
                                            type:   response.content_type,
                                            length: response.content_length,
                                            body:   response.body.force_encoding('UTF-8'),

                                        },
                                    }))
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tracer_client-0.3.0 lib/tracer_client/errors/api_request_failure.rb
tracer_client-0.2.1 lib/tracer_client/errors/api_request_failure.rb
tracer_client-0.1.5 lib/tracer_client/errors/api_request_failure.rb