reqwest icon indicating copy to clipboard operation
reqwest copied to clipboard

End promise chain

Open OliverJAsh opened this issue 9 years ago • 0 comments

reqwest({ url: 'http://foo.bar/baz' });

This promise will be rejected. The exception in this rejected promise will not be logged to the console.

Other promise libraries provide a done method which terminates the promise chain and throws any unhandled rejections:

reqwest({ url: 'http://foo.bar/baz' }).done();
// ==
// reqwest({ url: 'http://foo.bar/baz' }).catch(function (e) { setTimeout(function () { throw e; }); });

Could we add something like this?

OliverJAsh avatar Jul 16 '15 11:07 OliverJAsh