class Netfira::WebConnect::RackApp::Exceptions::HttpException
Attributes
category[RW]
code[RW]
headers[R]
status[RW]
headers[R]
Public Class Methods
new(message = nil, details = nil)
click to toggle source
Calls superclass method
# File lib/netfira/web_connect/rack_app/exceptions/http_exception.rb, line 16 def initialize(message = nil, details = nil) super message || self.class.name.demodulize.underscore.humanize @headers = self.class.headers.dup @details = details end
Public Instance Methods
body()
click to toggle source
# File lib/netfira/web_connect/rack_app/exceptions/http_exception.rb, line 22 def body @body ||= make_body end
Private Instance Methods
make_body()
click to toggle source
# File lib/netfira/web_connect/rack_app/exceptions/http_exception.rb, line 30 def make_body body = {errorMessage: message} body.merge! @details if Hash === @details body end