ic-ajax icon indicating copy to clipboard operation
ic-ajax copied to clipboard

Send Error instances to reject()

Open joeyespo opened this issue 10 years ago • 4 comments

Thanks for ic-ajax!

One small problem though. My company is also using a library that catches and reports unhandled RSVP errors, and I kept getting an [object Object] as a message with no other context information. We were able to track it down to ic-ajax sending an object to reject() instead of the recommended Error instance (here and here). This is reasonable because it helps debugging efforts and also because in practice, a lot of tools have come to expect this.

The fix aims to be minimally invasive by still providing jqXHR, textStatus, and errorThrown so existing code doesn't break, while still replacing a generic object with an Error instance.

joeyespo avatar Mar 10 '15 17:03 joeyespo

cc @tchak

I think we are planning to deprecate this, and move to a fetch polyfil. Short term, we may take an intermediate step.

stefanpenner avatar Mar 10 '15 18:03 stefanpenner

@stefanpenner Excellent. Thanks for replying!

joeyespo avatar Mar 10 '15 18:03 joeyespo

@stefanpenner Did this library ever get deprecated? Did we ever move to a fetch polyfill? Just curious how the state of things is in 2017.

Kerrick avatar Nov 17 '17 16:11 Kerrick

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Oct 03 '19 12:10 CLAassistant