clarification, "hung promise" means that it remains hung after the get() promise fulfills and async has had a chance to settle.
-
-
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Which one is it?
-
I first want to find out what people's intuitions are.
-
But spoilers are the best ....pic.twitter.com/pT0R8TiY6s
-
A throw inside a .catch() should re-reject, I thought.
-
Arrow function implicit return doesn’t play nicely with throw, IIRC :/
-
Should not matter - throw causes abrupt completion, unwinding w/o return value.
-
yeah nothing to do with the return itself, just basic statement/expression mismatch for throw i *think*
-
Throw should be an expression, imo. It’s weird that it isn’t.
- 24 more replies
New conversation -
-
-
To me, the promise is attached to the request so if its 200 then promise fulfilled. Valid JSON is a separate issue and should have its own validation structure
-
Even if not a 200, the promise still is fulfilled ??
- 1 more reply
New conversation -
-
-
I would expect a syntax error if “throw expressions” are not supported in the JS engine, otherwise a rejected promise.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
We actually had this almost this exact issue. We were using fetch and response.json() was throwing an error. Took a while to figure out
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I would expect an uncaught error, since it gets re-thrown within the `.catch()` and there's not an additional `.catch()`
-
Then again if you simply return from inside a `.then()` (as opposed to `return Promise.resolve()`) you get a resolved promise...
End of conversation
New conversation -
-
-
Compile error due to the throw in an arrow function. Otherwise it should be a rejected promise.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Really looking forward to this answer, as I think it might be the solution to some (read: over 100k) errors we've been having
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Just realized that's a throw in a catch, so it's probably a fulfilled promise and a thrown error?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.