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


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

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


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

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