From eaa44f74977dac67e355439c221761518b5711f9 Mon Sep 17 00:00:00 2001 From: Joe Germuska Date: Tue, 18 Mar 2014 09:49:47 -0500 Subject: [PATCH] catch 400 response from Google and clearly indicate that the spreadsheet URL is bad or it's not public --- source/js/VMM.Timeline.DataObj.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/js/VMM.Timeline.DataObj.js b/source/js/VMM.Timeline.DataObj.js index 1ca7283..c68bc5b 100644 --- a/source/js/VMM.Timeline.DataObj.js +++ b/source/js/VMM.Timeline.DataObj.js @@ -200,6 +200,11 @@ if (typeof VMM.Timeline !== 'undefined' && typeof VMM.Timeline.DataObj == 'undef VMM.Timeline.DataObj.model.googlespreadsheet.buildData(d); }) .error(function(jqXHR, textStatus, errorThrown) { + if (jqXHR.status == 400) { + VMM.fireEvent(global, VMM.Timeline.Config.events.messege, "Error reading Google spreadsheet. Check the URL and make sure it's published to the web."); + clearTimeout(timeout); + return; + } trace("Google Docs ERROR"); trace("Google Docs ERROR: " + textStatus + " " + jqXHR.responseText); })