Exception: K8s::Error
- Inherits:
-
StandardError
- Object
- StandardError
- K8s::Error
- Defined in:
- lib/k8s/error.rb
Overview
Top-level class for all errors raised by this gem.
Direct Known Subclasses
Defined Under Namespace
Classes: API, UndefinedResource
Constant Summary collapse
- HTTP_STATUS_ERRORS =
specific API error subtypes for HTTP status codes Hash=> Class<API>
{}
Class Method Summary collapse
-
.define_status_error(code, name) ⇒ Object
define a new API error type on the module for the given HTTP status code.
Class Method Details
.define_status_error(code, name) ⇒ Object
define a new API error type on the module for the given HTTP status code
41 42 43 |
# File 'lib/k8s/error.rb', line 41 def self.define_status_error(code, name) HTTP_STATUS_ERRORS[code] = self.const_set(name, Class.new(API)) end |