Class: LedgerSync::Ledgers::TestLedger::Util::LedgerErrorParser::AuthenticationMatcher

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



26
27
28
# File 'lib/ledger_sync/test/support/test_ledger/util/ledger_error_parser.rb', line 26

def error_class
  Error::LedgerError::AuthenticationError
end

#match?Boolean

Returns:

  • (Boolean)


34
35
36
37
38
# File 'lib/ledger_sync/test/support/test_ledger/util/ledger_error_parser.rb', line 34

def match?
  code == 3200 ||
    message.include?('authenticationfailed') ||
    message.include?('errorcode=003200')
end

#output_messageObject



30
31
32
# File 'lib/ledger_sync/test/support/test_ledger/util/ledger_error_parser.rb', line 30

def output_message
  "Authentication Failed with: #{error_message}"
end