Exception: MyJohnDeereApi::InvalidRecordError
- Inherits:
-
StandardError
- Object
- StandardError
- MyJohnDeereApi::InvalidRecordError
- Defined in:
- lib/my_john_deere_api/errors/invalid_record_error.rb
Overview
This error is used in a context that will fail in the absence of a valid oAuth access token. We have classes that may only need access tokens for some use cases.
Instance Method Summary collapse
-
#initialize(errors = {}) ⇒ InvalidRecordError
constructor
argument is a hash of attributes and their error messages, which will be built into the raised message.
Constructor Details
#initialize(errors = {}) ⇒ InvalidRecordError
argument is a hash of attributes and their error messages, which will be built into the raised message.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/my_john_deere_api/errors/invalid_record_error.rb', line 13 def initialize(errors = {}) = 'Record is invalid' unless errors.empty? = [] errors.each do |attribute, | << "#{attribute} #{}" end = "#{}: #{.join('; ')}" end super() end |