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?, #server_error?, #telemetry_error_type, #trace_count, #unsupported?

Constructor Details

#initialize(error) ⇒ ErrorResponse

Returns a new instance of ErrorResponse.



134
135
136
# File 'lib/datadog/ci/transport/http.rb', line 134

def initialize(error)
  @error = error
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



138
139
140
# File 'lib/datadog/ci/transport/http.rb', line 138

def error
  @error
end

Instance Method Details

#codeObject



148
149
150
# File 'lib/datadog/ci/transport/http.rb', line 148

def code
  nil
end

#header(name) ⇒ Object



144
145
146
# File 'lib/datadog/ci/transport/http.rb', line 144

def header(name)
  nil
end

#inspectObject



156
157
158
# File 'lib/datadog/ci/transport/http.rb', line 156

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

#payloadObject



140
141
142
# File 'lib/datadog/ci/transport/http.rb', line 140

def payload
  ""
end

#response_sizeObject



152
153
154
# File 'lib/datadog/ci/transport/http.rb', line 152

def response_size
  0
end