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

Promise doesn't get rejected #256

Open
remmycat opened this issue Mar 28, 2016 · 5 comments
Open

Promise doesn't get rejected #256

remmycat opened this issue Mar 28, 2016 · 5 comments

Comments

@remmycat
Copy link

Hey, I just noticed that twit seems to not reject a promise when, for example, the rate limit exceeded in a get request. Instead it just resolves the promise and has the error(s) as an array in the result.data.
I'm not sure if it's intended like that but I expected it to reject the promise when I don't get the data I requested (my promise chain should break when that happens).

@richardkazuomiller
Copy link

I also think errors should reject the promise! (^^♪

remmycat added a commit to remmycat/twit that referenced this issue Jul 20, 2016
remmycat added a commit to remmycat/twit that referenced this issue Jul 20, 2016
@Chandler
Copy link
Contributor

Hey @remhume, I opened a PR #297 before I realized you already had one open. If they go with yours maybe you can at least make good use of my unit test : )

@stuartpb
Copy link

stuartpb commented May 23, 2017

Yeah, this is just straight-up a bug in the promise implementation. #297 fixes it correctly - I would merge that in to fix it (and close #285 without merging).

@Chandler
Copy link
Contributor

@stuartpb nice, who do we need to ping to get it merged?

@dandv
Copy link

dandv commented Jul 26, 2018

Thanks everyone for showing demand for rejecting on errors. twitter-lite has also implemented this behavior.

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

5 participants