Class: WebfleetConnect::FormatHandlers::JsonErrorParser

Inherits:
ErrorParser
  • Object
show all
Defined in:
lib/webfleet_connect/format_handlers/json_error_parser.rb

Instance Method Summary collapse

Methods inherited from ErrorParser

#initialize

Constructor Details

This class inherits a constructor from WebfleetConnect::FormatHandlers::ErrorParser

Instance Method Details

#error?(message) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
9
# File 'lib/webfleet_connect/format_handlers/json_error_parser.rb', line 5

def error?(message)
  json = to_json(message)
  return false if json.is_a?(Array)
  json.key?(:errorCode)
end