fix error handling in google drive

This commit is contained in:
Matias Alejo Garcia 2014-09-19 16:04:27 -03:00
parent 810ce0bf5d
commit d391817819
1 changed files with 3 additions and 1 deletions

View File

@ -172,7 +172,9 @@ GoogleDrive.prototype.setItem = function(k, v, cb) {
// console.log('[googleDrive.js.148:args:]', args); //TODO
var request = gapi.client.request(args);
request.execute(cb);
request.execute(function(ret) {
return cb(ret.kind === 'drive#file' ? null : new Error('error saving file on drive'));
});
});
});
};