Exception: Craigslist::API::ValidationError
- Defined in:
- lib/craigslist/api/errors.rb
Overview
Raised when a Posting is missing fields the interface requires, caught locally before a request is made.
Instance Attribute Summary collapse
-
#errors ⇒ Array<String>
readonly
Every problem found, not just the first.
Instance Method Summary collapse
-
#initialize(errors) ⇒ ValidationError
constructor
A new instance of ValidationError.
Constructor Details
#initialize(errors) ⇒ ValidationError
Returns a new instance of ValidationError.
19 20 21 22 |
# File 'lib/craigslist/api/errors.rb', line 19 def initialize(errors) @errors = Array(errors) super(@errors.join("; ")) end |
Instance Attribute Details
#errors ⇒ Array<String> (readonly)
Returns every problem found, not just the first.
17 18 19 |
# File 'lib/craigslist/api/errors.rb', line 17 def errors @errors end |