Thanks for having taken the time to write this, great post.
Just a couple of things that they are not correct:
err.statusCode === 400
: Promise.reject(err)) // you missed rejecting in your example
.then(r => r.text())
.catch(err => console.error(err));
Thanks for giving the feedback.
Yes I agree, I think I tried to convey that it doesn't do any sort of batch execution, but then promises by design run the moment they are created. I think I should have an additional tip which clarifies about how promises run.
Whoops, missed that, corrected it :)
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.