Exception: Sendle::Api::Errors::UnprocessableEntity
- Inherits:
-
StandardError
- Object
- StandardError
- Sendle::Api::Errors::UnprocessableEntity
- Defined in:
- lib/sendle/api/errors/unprocessable_entity.rb
Instance Method Summary collapse
-
#initialize(messages) ⇒ UnprocessableEntity
constructor
A new instance of UnprocessableEntity.
- #to_s ⇒ Object
Constructor Details
#initialize(messages) ⇒ UnprocessableEntity
Returns a new instance of UnprocessableEntity.
6 7 8 |
# File 'lib/sendle/api/errors/unprocessable_entity.rb', line 6 def initialize() @messages = end |
Instance Method Details
#to_s ⇒ Object
10 11 12 13 14 |
# File 'lib/sendle/api/errors/unprocessable_entity.rb', line 10 def to_s msg = "Please fix the following errors and try again - " @messages.each { |k, v| msg += "#{k}: #{v.join(', ')}" } msg end |