Exception: Kube::DownloadError
- Defined in:
- lib/kube/errors.rb
Overview
Raised when a schema download fails.
Instance Attribute Summary collapse
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(message = nil, url: nil, status_code: nil) ⇒ DownloadError
constructor
A new instance of DownloadError.
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( = nil, url: nil, status_code: nil) @url = url @status_code = status_code super( || "Failed to download schema: #{@url} (HTTP #{@status_code})") end |
Instance Attribute Details
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
15 16 17 |
# File 'lib/kube/errors.rb', line 15 def status_code @status_code end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
15 16 17 |
# File 'lib/kube/errors.rb', line 15 def url @url end |