Exception: Kube::DownloadError

Inherits:
Error
  • Object
show all
Defined in:
lib/kube/errors.rb

Overview

Raised when a schema download fails.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, url: nil, status_code: nil) ⇒ DownloadError

Returns a new instance of DownloadError.



17
18
19
20
21
# File 'lib/kube/errors.rb', line 17

def initialize(message = nil, url: nil, status_code: nil)
  @url         = url
  @status_code = status_code
  super(message || "Failed to download schema: #{@url} (HTTP #{@status_code})")
end

Instance Attribute Details

#status_codeObject (readonly)

Returns the value of attribute status_code.



15
16
17
# File 'lib/kube/errors.rb', line 15

def status_code
  @status_code
end

#urlObject (readonly)

Returns the value of attribute url.



15
16
17
# File 'lib/kube/errors.rb', line 15

def url
  @url
end