Exception: Cronofy::InvalidRequestError

Inherits:
APIError show all
Defined in:
lib/cronofy/errors.rb

Instance Attribute Summary

Attributes inherited from APIError

#response

Instance Method Summary collapse

Methods inherited from APIError

#body, #headers, #initialize, #inspect

Constructor Details

This class inherits a constructor from Cronofy::APIError

Instance Method Details

#errorsObject



49
50
51
52
53
54
55
56
# File 'lib/cronofy/errors.rb', line 49

def errors
  @errors ||= begin
    json = JSON.parse(self.body)
    json.fetch("errors", Hash.new)
  rescue
    Hash.new
  end
end

#messageObject



45
46
47
# File 'lib/cronofy/errors.rb', line 45

def message
  "#{super} - #{errors.inspect}"
end