Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle 503 errors gracefully #21

Open
Robdr opened this issue Nov 6, 2013 · 3 comments
Open

Handle 503 errors gracefully #21

Robdr opened this issue Nov 6, 2013 · 3 comments

Comments

@Robdr
Copy link

Robdr commented Nov 6, 2013

When the Instagram API gives a 503 response (503 Service Unavailable, No server is available to handle this request.) the library now gives the following error: "SyntaxError: Unexpected token < "

Might be nice to handle it more gracefully

@despairblue
Copy link

👍

@papayaah
Copy link

papayaah commented Feb 7, 2016

fast forward to 2016 this is still an issue?

@despairblue
Copy link

The project hasn't had any commits since then. So I assume that will only have changed if instagram makes sure not to send HTML under any circumstances. I wouldn't trust that.

The status code could be checked to return an error it it isn't 200 and JSON.stringify could be guarded by try-catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants