Save an exception/catch when failing to import a record.

This commit is contained in:
Edward Lee 2009-08-26 17:49:23 -07:00
parent 009411f482
commit 76cc6cfde5

View File

@ -135,6 +135,10 @@ RecordManager.prototype = {
this.response = {}; this.response = {};
this.response = new Resource(url).get(); this.response = new Resource(url).get();
// Don't parse and save the record on failure
if (!this.response.success)
return null;
let record = new this._recordType(); let record = new this._recordType();
record.deserialize(this.response); record.deserialize(this.response);
record.uri = url; record.uri = url;