Exception: Puppet::Network::HTTP::Error::HTTPServerError

Inherits:
HTTPError show all
Defined in:
lib/puppet/network/http/error.rb

Constant Summary collapse

CODE =
500

Instance Attribute Summary

Attributes inherited from HTTPError

#issue_kind, #status

Instance Method Summary collapse

Constructor Details

#initialize(original_error, issue_kind = Issues::RUNTIME_ERROR) ⇒ HTTPServerError

Returns a new instance of HTTPServerError.



66
67
68
# File 'lib/puppet/network/http/error.rb', line 66

def initialize(original_error, issue_kind = Issues::RUNTIME_ERROR)
  super(_("Server Error: %{message}") % { message: original_error.message }, CODE, issue_kind)
end

Instance Method Details

#to_jsonObject



70
71
72
# File 'lib/puppet/network/http/error.rb', line 70

def to_json
  Puppet::Util::Json.dump({:message => message, :issue_kind => @issue_kind})
end