Exception: Cloudflare::RequestError
- Inherits:
-
StandardError
- Object
- StandardError
- Cloudflare::RequestError
- Defined in:
- lib/cloudflare/representation.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(request, value) ⇒ RequestError
constructor
A new instance of RequestError.
Constructor Details
#initialize(request, value) ⇒ RequestError
Returns a new instance of RequestError.
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/cloudflare/representation.rb', line 15 def initialize(request, value) if error = value[:error] super("#{request}: #{error}") elsif errors = value[:errors] super("#{request}: #{errors.map{|attributes| attributes[:message]}.join(', ')}") else super("#{request}: #{value.inspect}") end @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
27 28 29 |
# File 'lib/cloudflare/representation.rb', line 27 def value @value end |