Sha256: 17b229d8ecf929a25c10a67f8944081de5ee43212647296eba96687b99d845d4

Contents?: true

Size: 592 Bytes

Versions: 43

Compression:

Stored size: 592 Bytes

Contents

# typed: true
# frozen_string_literal: true

module Setsuzoku
  # The base definition for the exception handling class.
  # This can be overridden by application configuration.
  class ExternalApiHandler
    def call_external_api_wrapper(**args)
      puts('Setsuzoku API call pending')
      response = yield
      puts("Setsuzoku API call complete. Success status: #{response[:success]}")
    end

    def call_external_api_exception(**args)
      puts(args[:exception].backtrace.join("\n")) if args[:exception]
      puts("call_external_api failed with: #{args.inspect}")
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
setsuzoku-0.15.7 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.15.6 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.15.5 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.15.4 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.15.3 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.15.2 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.15.1 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.15.0 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.14.9 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.14.8 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.14.7 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.14.6 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.14.5 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.14.4 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.14.3 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.14.2 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.14.1 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.14.0 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.13.1 lib/setsuzoku/external_api_handler.rb
setsuzoku-0.13.0 lib/setsuzoku/external_api_handler.rb