Module: Tanshuku::Configuration::DefaultExceptionReporter

Defined in:
lib/tanshuku/configuration.rb

Overview

The default error-reporter. Calls Rails.logger.warn.

Class Method Summary collapse

Class Method Details

.call(exception:, original_url:) ⇒ void

This method returns an undefined value.

Calls Rails.logger.warn and logs the exception and the original URL.

Parameters:

  • exception (Exception)

    An error instance at shortening a URL.

  • original_url (String)

    The original URL failed to shorten.



40
41
42
# File 'lib/tanshuku/configuration.rb', line 40

def self.call(exception:, original_url:)
  Rails.logger.warn("Tanshuku - Failed to shorten a URL: #{exception.inspect} for #{original_url.inspect}")
end