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.



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

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



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

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