Class: Datadog::CI::Transport::HTTP::ErrorResponse

Inherits:
Adapters::Net::Response show all
Defined in:
lib/datadog/ci/transport/http.rb

Instance Attribute Summary collapse

Attributes inherited from Adapters::Net::Response

#duration_ms, #http_response, #request_compressed, #request_size

Instance Method Summary collapse

Methods inherited from Adapters::Net::Response

#client_error?, #gzipped_body?, #gzipped_content?, #not_found?, #ok?, #response_size, #server_error?, #telemetry_error_type, #trace_count, #unsupported?

Constructor Details

#initialize(error) ⇒ ErrorResponse

Returns a new instance of ErrorResponse.



106
107
108
# File 'lib/datadog/ci/transport/http.rb', line 106

def initialize(error)
  @error = error
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



110
111
112
# File 'lib/datadog/ci/transport/http.rb', line 110

def error
  @error
end

Instance Method Details

#codeObject



120
121
122
# File 'lib/datadog/ci/transport/http.rb', line 120

def code
  nil
end

#header(name) ⇒ Object



116
117
118
# File 'lib/datadog/ci/transport/http.rb', line 116

def header(name)
  nil
end

#inspectObject



124
125
126
# File 'lib/datadog/ci/transport/http.rb', line 124

def inspect
  "ErrorResponse error:#{error}"
end

#payloadObject



112
113
114
# File 'lib/datadog/ci/transport/http.rb', line 112

def payload
  ""
end