Exception: Puppet::Rest::ResponseError

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

Instance Attribute Summary collapse

Attributes inherited from Error

#original

Instance Method Summary collapse

Constructor Details

#initialize(msg, response = nil) ⇒ ResponseError

Error thrown when request status is not OK.

Parameters:

  • msg (String)

    the error message

  • response (Puppet::Rest::Response) (defaults to: nil)

    the response from the failed request



9
10
11
12
# File 'lib/puppet/rest/errors.rb', line 9

def initialize(msg, response = nil)
  super(msg)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/puppet/rest/errors.rb', line 3

def response
  @response
end