Exception: Puppet::Network::HTTP::Error::HTTPServerError
Constant Summary collapse
- CODE =
500
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
readonly
Returns the value of attribute backtrace.
Attributes inherited from HTTPError
Instance Method Summary collapse
-
#initialize(original_error, issue_kind = Issues::RUNTIME_ERROR) ⇒ HTTPServerError
constructor
A new instance of HTTPServerError.
- #to_json ⇒ Object
Constructor Details
#initialize(original_error, issue_kind = Issues::RUNTIME_ERROR) ⇒ HTTPServerError
60 61 62 63 |
# File 'lib/puppet/network/http/error.rb', line 60 def initialize(original_error, issue_kind = Issues::RUNTIME_ERROR) super("Server Error: " + original_error., CODE, issue_kind) @backtrace = ["Warning: The 'stacktrace' property is deprecated and will be removed in a future version of Puppet. For security reasons, stacktraces are not returned with Puppet HTTP Error responses."] end |
Instance Attribute Details
#backtrace ⇒ Object (readonly)
Returns the value of attribute backtrace.
58 59 60 |
# File 'lib/puppet/network/http/error.rb', line 58 def backtrace @backtrace end |
Instance Method Details
#to_json ⇒ Object
65 66 67 |
# File 'lib/puppet/network/http/error.rb', line 65 def to_json JSON({:message => , :issue_kind => @issue_kind, :stacktrace => self.backtrace}) end |