Exception: MinatoErrorHandler::Errors::MinatoError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/minato_error_handler/errors/minato_error.rb

Direct Known Subclasses

ExternalError, InternalError

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#caused_byObject

Returns the value of attribute caused_by.



9
10
11
# File 'lib/minato_error_handler/errors/minato_error.rb', line 9

def caused_by
  @caused_by
end

#debug_detailsObject

Returns the value of attribute debug_details.



9
10
11
# File 'lib/minato_error_handler/errors/minato_error.rb', line 9

def debug_details
  @debug_details
end

#detailsObject

Returns the value of attribute details.



9
10
11
# File 'lib/minato_error_handler/errors/minato_error.rb', line 9

def details
  @details
end

#http_requestObject

Returns the value of attribute http_request.



10
11
12
# File 'lib/minato_error_handler/errors/minato_error.rb', line 10

def http_request
  @http_request
end

#http_responseObject

Returns the value of attribute http_response.



10
11
12
# File 'lib/minato_error_handler/errors/minato_error.rb', line 10

def http_response
  @http_response
end

Instance Method Details

#as_jsonObject



40
41
42
# File 'lib/minato_error_handler/errors/minato_error.rb', line 40

def as_json
  serialized_hash(serializable_methods_to_log).as_json
end

#backtrace=(backtrace) ⇒ Object



28
29
30
# File 'lib/minato_error_handler/errors/minato_error.rb', line 28

def backtrace=(backtrace)
  set_backtrace(backtrace)
end

#codeObject



24
25
26
# File 'lib/minato_error_handler/errors/minato_error.rb', line 24

def code
  self.class.name
end

#error_reporting_typeObject



16
17
18
# File 'lib/minato_error_handler/errors/minato_error.rb', line 16

def error_reporting_type
  "type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent"
end

#json_responseObject



44
45
46
# File 'lib/minato_error_handler/errors/minato_error.rb', line 44

def json_response
  serialized_hash(serializable_methods_to_response).as_json
end

#messageObject



12
13
14
# File 'lib/minato_error_handler/errors/minato_error.rb', line 12

def message
  raise_method_not_implemented_error __method__
end

#stack_traceObject



64
65
66
# File 'lib/minato_error_handler/errors/minato_error.rb', line 64

def stack_trace
  backtrace
end

#status_codeObject



20
21
22
# File 'lib/minato_error_handler/errors/minato_error.rb', line 20

def status_code
  raise_method_not_implemented_error __method__
end

#to_json(*_args) ⇒ Object



36
37
38
# File 'lib/minato_error_handler/errors/minato_error.rb', line 36

def to_json(*_args)
  serialized_hash(serializable_methods_to_log).to_json
end

#unique_identifierObject



32
33
34
# File 'lib/minato_error_handler/errors/minato_error.rb', line 32

def unique_identifier
  @unique_identifier ||= SecureRandom.uuid[0, 8]
end