lib/codat/models/integration.rb in codat-0.1.4 vs lib/codat/models/integration.rb in codat-0.1.5

- old
+ new

@@ -10,12 +10,10 @@ attributes :key, :logo_url, :name, :enabled, :source_id, :integration_id, :source_type def self.all(params = {}) result = get(ENDPOINT, params) - return [] if result.status == 404 - - return result.body if result.status == 400 + return [] unless successful_response?(result) result.body.map { |integration| new(json: integration) } end end end