-
Notifications
You must be signed in to change notification settings - Fork 11
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
Possible issues after switching to [email protected] #31
Comments
Seems that the switch to sync@v4 has caused issues in this module where the I believe it all In
The error handler then tries to access Could be as simple as change this code (starting at L103): if (cb) {
var error = new Error(resp.rawRequest.statusText);
error.status = resp.rawRequest.status;
cb(error);
} Not sure if this affects I'm surprised this wasn't caught in the test suite. |
I've run into this as well however I would be more inclined to simply always pass resp into the cb, possibly adding a success key based on the statusCode rather than an error since it's never thrown it's not like you can wrap the fetch request in a try/catch block, nor do the line/file numbers line up to anything useful so we gain no advantage for using Javascript errors, and worse dumping this out in the console yields nothing useful. |
Before, `resp` didn't have `statusText` and `status` as properties. Instead, those properties were accessible through either `resp.rawRequest` or through the value returned from calling `model.fetch` (both, I believe are the xhr instance) Related to AmpersandJS#31
The text was updated successfully, but these errors were encountered: