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

Status codes 201-299 shouldn't be errors #147

Closed
Papilloni opened this issue May 11, 2016 · 3 comments
Closed

Status codes 201-299 shouldn't be errors #147

Papilloni opened this issue May 11, 2016 · 3 comments

Comments

@Papilloni
Copy link

Papilloni commented May 11, 2016

There is a "return" missing in line 144 of twitter.js. Without it, a callback will be called twice if there is an exception. (Which happens if you try to upload in chunks, because this can't be JSON parsed, or if the connection to the internet is temporary lost)

Also status codes 201,202 and 204 aren't errors and should be included in line 149. They happen when uploading chunks.

@reconbot
Copy link
Collaborator

This is fixed in master

@reconbot reconbot reopened this May 14, 2016
@reconbot
Copy link
Collaborator

Whoops, the first issue is fixed in master, the error codes haven't yet been addressed.

@reconbot reconbot changed the title Error in twitter.js Status codes 201-299 shouldn't be errors May 14, 2016
@lyzadanger
Copy link

lyzadanger commented Aug 2, 2016

@reconbot Ran into this one today when building video/media uploads (via the three-step chunked process as per #110

Right now I have a cumbersome conditional for handling HTTP 2xx responses. Get this fixed and shipped and I can provide an example of using this module for three-step media uploads :D.

reconbot added a commit that referenced this issue Aug 3, 2016
 - Bonus! Max complexity and max statements have fallen
 - exercises the REST api capabilities

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

No branches or pull requests

3 participants