Exception: MinatoErrorHandler::Errors::ExternalError

Inherits:
MinatoError
  • Object
show all
Defined in:
lib/minato_error_handler/errors/external_error.rb

Instance Attribute Summary collapse

Attributes inherited from MinatoError

#caused_by, #details, #http_request, #http_response

Instance Method Summary collapse

Methods inherited from MinatoError

#as_json, #backtrace=, #code, #error_reporting_type, #json_response, #stack_trace, #to_json, #unique_identifier

Constructor Details

#initialize(req: nil, res: nil) ⇒ ExternalError

Returns a new instance of ExternalError.



8
9
10
11
12
# File 'lib/minato_error_handler/errors/external_error.rb', line 8

def initialize(req: nil, res: nil)
  @req = req
  @res = res
  super()
end

Instance Attribute Details

#reqObject

Returns the value of attribute req.



6
7
8
# File 'lib/minato_error_handler/errors/external_error.rb', line 6

def req
  @req
end

#resObject

Returns the value of attribute res.



6
7
8
# File 'lib/minato_error_handler/errors/external_error.rb', line 6

def res
  @res
end

Instance Method Details

#debug_detailsObject



22
23
24
# File 'lib/minato_error_handler/errors/external_error.rb', line 22

def debug_details
  { request: req, response: res }
end

#messageObject



14
15
16
# File 'lib/minato_error_handler/errors/external_error.rb', line 14

def message
  "A external error has occurred!"
end

#status_codeObject



18
19
20
# File 'lib/minato_error_handler/errors/external_error.rb', line 18

def status_code
  503
end