lib/newslettre/lists.rb in newslettre-0.2.2 vs lib/newslettre/lists.rb in newslettre-0.2.3
- old
+ new
@@ -8,10 +8,12 @@
def == other
self.to_hash == other
end
def load_data
- self.data ||= request('get', :list => self.list).first.to_hash
+ loaded = request('get', :list => self.list).first
+ raise Newslettre::API::ClientFailure, "missing #{self.list}" if loaded.nil?
+ self.data ||= loaded.to_hash
end
def to_hash
load_data