class KubeException

TODO: remove this on next major version bump Deprected http exception

Attributes

error_code[R]
message[R]
response[R]

Public Class Methods

new(error_code, message, response) click to toggle source
# File lib/kubeclient/http_error.rb, line 6
def initialize(error_code, message, response)
  @error_code = error_code
  @message = message
  @response = response
end

Public Instance Methods

to_s() click to toggle source
# File lib/kubeclient/http_error.rb, line 12
def to_s
  string = "HTTP status code #{@error_code}, #{@message}"
  if @response.is_a?(RestClient::Response) && @response.request
    string << " for #{@response.request.method.upcase} #{@response.request.url}"
  end
  string
end