Class: LedgerSync::QuickBooksOnline::Util::LedgerErrorParser::ClientMatcher

Inherits:
ErrorMatcher
  • Object
show all
Defined in:
lib/ledger_sync/quickbooks_online/util/ledger_error_parser.rb

Instance Attribute Summary

Attributes inherited from ErrorMatcher

#error, #message

Instance Method Summary collapse

Methods inherited from ErrorMatcher

#body, #code, #detail, #error_message, #initialize, #parsed_body

Constructor Details

This class inherits a constructor from LedgerSync::QuickBooksOnline::Util::ErrorMatcher

Instance Method Details

#error_classObject



60
61
62
# File 'lib/ledger_sync/quickbooks_online/util/ledger_error_parser.rb', line 60

def error_class
  Error::LedgerError::ConfigurationError
end

#match?Boolean

Returns:

  • (Boolean)


68
69
70
71
# File 'lib/ledger_sync/quickbooks_online/util/ledger_error_parser.rb', line 68

def match?
  message.include?('invalid_client') ||
    message.include?('invalid_grant')
end

#output_messageObject



64
65
66
# File 'lib/ledger_sync/quickbooks_online/util/ledger_error_parser.rb', line 64

def output_message
  "Missing Configuration: #{error_message}"
end