class CDMDEXER::TransformationErrorMessage
Raise anything but timeout errors or other http connection errors Notify downstream in case users want to log the non-timeout errors
Attributes
message[R]
notification_klass[R]
Public Class Methods
new(message: :MISSING_ERROR_MESSAGE, notification_klass: CDMDEXER::CdmError)
click to toggle source
# File lib/cdmdexer/transformation_error_message.rb, line 6 def initialize(message: :MISSING_ERROR_MESSAGE, notification_klass: CDMDEXER::CdmError) @notification_klass = notification_klass @message = message end
Public Instance Methods
notify()
click to toggle source
# File lib/cdmdexer/transformation_error_message.rb, line 12 def notify notification_klass.call! message raise message if http_error? end
Private Instance Methods
http_error?()
click to toggle source
# File lib/cdmdexer/transformation_error_message.rb, line 19 def http_error? !(message =~ /ConnectionError/).nil? end