Class: LedgerSync::Ledgers::TestLedger::Util::LedgerErrorParser::ClientMatcher

Inherits:
ErrorMatcher
  • Object
show all
Defined in:
lib/ledger_sync/test/support/test_ledger/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

Constructor Details

This class inherits a constructor from LedgerSync::Ledgers::TestLedger::Util::ErrorMatcher

Instance Method Details

#error_classObject



58
59
60
# File 'lib/ledger_sync/test/support/test_ledger/util/ledger_error_parser.rb', line 58

def error_class
  Error::LedgerError::ConfigurationError
end

#match?Boolean

Returns:

  • (Boolean)


66
67
68
69
# File 'lib/ledger_sync/test/support/test_ledger/util/ledger_error_parser.rb', line 66

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

#output_messageObject



62
63
64
# File 'lib/ledger_sync/test/support/test_ledger/util/ledger_error_parser.rb', line 62

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