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
Catch does not return Error #255
Comments
This is how it is done with Angular's $http, which this library is based on. More or less it's an artifact and not necessarily the right way to do things. I would like to move to a more consistent error path where an function createError(message, details) {
var err = new Error(message);
Object.keys(details, function (key) {
err[key] = details[key];
});
return err;
}
createError('timeout of ' + config.timeout + 'ms exceeded', {
code: 'ECONNABORTED',
config: config
}); I would also like to change the lib to only reject the |
@mzabriskie The |
Closing as duplicate of #24 |
Why does catch return an object and not an error object?
The text was updated successfully, but these errors were encountered: