Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Handling errors #20

Closed
jlord opened this issue Apr 16, 2013 · 13 comments
Closed

Handling errors #20

jlord opened this issue Apr 16, 2013 · 13 comments

Comments

@jlord
Copy link

jlord commented Apr 16, 2013

Would be awesome to get a callback to handle error responses from Google. Today I was getting 324 (ERR_EMPTY_RESPONSE: Server closed the connection without sending any data) and 429 (unknown).

I <3 Tabletop

@lisawilliams
Copy link

I'm currently getting a 400: Bad Request error pointing to line 184 in tabletop.js (here's my code: lisawilliams/tabletop-js@13a630d)

Line 184 reads: document.getElementsByTagName('script')[0].parentNode.appendChild(script);

I'm also pretty excited about Tabletop & can't wait to get it running!

@catdad
Copy link

catdad commented May 31, 2013

I fixed error handling in my own project a while back, but did not submit a pull request since it broke the current code. I used Node.js style continuation for the callback -- (error, data, tabletop) -- but this obviously would require everyone to change their callbacks. Maybe (data, tabletop, error) would be better? If that sounds good I can update my code and submit a pull request soon.

@jsoma
Copy link
Owner

jsoma commented May 31, 2013

I'd love to hear how you figured out there was an error loading coming back from Google - AFAIK with script tag injection you've got limited support for onerror and a lot of folks end up having to just use timeouts.

@catdad
Copy link

catdad commented May 31, 2013

I thought so too, but I was pleasantly surprised when I added an event to the script tag object (not the tag itself, but the JS object) for errors. I tested it in Chrome, FF, IE9,8,7 and all work, at least for a "400 Bad request" error, so I just went with it. While I was at it, I also added an error callback for requesting a sheet with an invalid name. Check out my fork of it (sorry, it's an older version). https://github.com/catdad/tabletop

@jsoma
Copy link
Owner

jsoma commented May 31, 2013

That's great! I'll take a look when I get a chance, it sounds like it's going to save a lot of folks a lot of headaches.

@timwis
Copy link

timwis commented Jun 25, 2013

Hey, is there any way to use timeouts with tabletop? I have a user experiencing a console error when I do a Tabletop.init (no idea why, getting an unexpected token '<' on ServiceLogin Line 1) and there's no way for my app to catch the error and time out.

@jsoma
Copy link
Owner

jsoma commented Jun 27, 2013

There's been a real big issue happening the past week where published Google Spreadsheets are intermittently being redirected to a login page. It's going to require a fix on Google's end, but I'll see if I can put something together later today to help with that specific scenario...

@timwis
Copy link

timwis commented Jun 27, 2013

Ah, so I'm not crazy! That's good. Well I appreciate your help!

@jengalas
Copy link

I've been experiencing it too (and thought it was something I was doing wrong). Thanks so much for anything you can come up with to help!

@jsoma
Copy link
Owner

jsoma commented Jun 28, 2013

Just to keep everyone in the loop, I've figured out how to reproduce it, it's definitely a Google bug, and I've put up a post on their product forums at http://productforums.google.com/forum/#!category-topic/docs/documents/0pneogfgzN0

Since the issue requires you to have previously signed into a Google account and had your session expire, using Flatware https://github.com/jsoma/flatware (or some other sort of proxying/caching mechanism) should solve the problem. If you pull the most recent Tabletop there's proxy support as well as a Flatware example.

Sorry to have hijacked the issue for this!

@talkingnews
Copy link

Hi @jsoma - thanks for all this great work. It would probably help a lot of people if you put the forums link above in the README section about this issue. Also, you say that Google "don't have a fix planned until September 30th".
Presumably this means you're aware of some kind of ticket, bug, note, issue, blog post or otherwise. If you can post where that is, it would be interesting to read and I'll be sure to star it or click the "me too" button (depending on where it is).

@jsoma
Copy link
Owner

jsoma commented Sep 3, 2013

Dropping the post link to the post into the README is a great idea! And the Google ticket is an internal one that I've only heard of secondhand, so I unfortunately can't link out to it.

@jsoma
Copy link
Owner

jsoma commented Oct 6, 2019

We now have error callbacks, along with Promise support. I think this kind of somewhat hopefully addresses this.

@jsoma jsoma closed this as completed Oct 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants