class Setsuzoku::ExternalApiHandler

The base definition for the exception handling class. This can be overridden by application configuration.

Public Instance Methods

call_external_api_exception(**args) click to toggle source
# File lib/setsuzoku/external_api_handler.rb, line 14
def call_external_api_exception(**args)
  puts(args[:exception].backtrace.join("\n")) if args[:exception]
  puts("call_external_api failed with: #{args.inspect}")
end
call_external_api_wrapper(**args) { || ... } click to toggle source
# File lib/setsuzoku/external_api_handler.rb, line 8
def call_external_api_wrapper(**args)
  puts('Setsuzoku API call pending')
  response = yield
  puts("Setsuzoku API call complete. Success status: #{response[:success]}")
end