From d3918178191231be59b239eeef3cb3b27bb540d8 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 19 Sep 2014 16:04:27 -0300 Subject: [PATCH] fix error handling in google drive --- plugins/GoogleDrive.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/GoogleDrive.js b/plugins/GoogleDrive.js index ee4260ea5..4c8783ac6 100644 --- a/plugins/GoogleDrive.js +++ b/plugins/GoogleDrive.js @@ -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')); + }); }); }); };