Exception: Common::Exceptions::ServiceOutage

Inherits:
BaseError
  • Object
show all
Defined in:
lib/common/exceptions/service_outage.rb

Overview

Service Outage - Breakers is reporting an outage on a backend system

Instance Method Summary collapse

Methods inherited from BaseError

#log_to_sentry?, #message, #sentry_type, #status_code

Constructor Details

#initialize(outage = nil, options = {}) ⇒ ServiceOutage

Returns a new instance of ServiceOutage.



10
11
12
13
# File 'lib/common/exceptions/service_outage.rb', line 10

def initialize(outage = nil, options = {})
  @outage = outage
  @detail = options[:detail] || i18n_field(:detail, service: @outage.service.name, since: @outage.start_time)
end

Instance Method Details

#errorsObject



15
16
17
# File 'lib/common/exceptions/service_outage.rb', line 15

def errors
  Array(SerializableError.new(i18n_data.merge(detail: @detail)))
end