Class: LedgerSync::QuickBooksOnline::Util::LedgerErrorParser::AuthenticationMatcher
- Inherits:
-
ErrorMatcher
- Object
- ErrorMatcher
- LedgerSync::QuickBooksOnline::Util::LedgerErrorParser::AuthenticationMatcher
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
#body, #code, #detail, #error_message, #initialize, #parsed_body
Instance Method Details
#error_class ⇒ Object
25
26
27
|
# File 'lib/ledger_sync/quickbooks_online/util/ledger_error_parser.rb', line 25
def error_class
Error::LedgerError::AuthenticationError
end
|
#match? ⇒ Boolean
33
34
35
36
37
38
39
|
# File 'lib/ledger_sync/quickbooks_online/util/ledger_error_parser.rb', line 33
def match?
code == 3200 ||
code == '3200' ||
message.downcase.include?('statuscode=401') ||
message.downcase.include?('authenticationfailed') ||
message.downcase.include?('errorcode=003200')
end
|
#output_message ⇒ Object
29
30
31
|
# File 'lib/ledger_sync/quickbooks_online/util/ledger_error_parser.rb', line 29
def output_message
"Authentication Failed with: #{error_message}"
end
|