Exception: BGS::ServiceException

Inherits:
Common::Exceptions::BackendServiceException show all
Includes:
SentryLogging
Defined in:
lib/bgs/exceptions/service_exception.rb

Instance Attribute Summary

Attributes inherited from Common::Exceptions::BackendServiceException

#key, #original_body, #original_status, #response_values

Instance Method Summary collapse

Methods included from SentryLogging

#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger, #set_sentry_metadata

Methods inherited from Common::Exceptions::BackendServiceException

#detail, #errors, #i18n_key, #message, #render_overides, #source, #status, #va900?, #va900_hint, #va900_warning, #validate_arguments!

Methods inherited from Common::Exceptions::BaseError

#errors, #i18n_data, #i18n_field, #i18n_interpolated, #i18n_key, #log_to_sentry?, #message, #sentry_type, #status_code

Constructor Details

#initialize(key, response_values = {}, original_status = nil, original_body = nil) ⇒ ServiceException

Returns a new instance of ServiceException.



10
11
12
# File 'lib/bgs/exceptions/service_exception.rb', line 10

def initialize(key, response_values = {}, original_status = nil, original_body = nil)
  super(key, response_values, original_status, original_body)
end

Instance Method Details

#codeObject (private)



16
17
18
# File 'lib/bgs/exceptions/service_exception.rb', line 16

def code
  @key.presence || 'unmapped_service_exception'
end