Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@ VERBS.concat("any").forEach(function (method) {

networkError: function () {
return reply(function (config) {
var error = utils.createAxiosError("Network Error", config);
var error = utils.createAxiosError("Network Error", config, undefined, "ERR_NETWORK");
return Promise.reject(error);
});
},

networkErrorOnce: function () {
return replyOnce(function (config) {
var error = utils.createAxiosError("Network Error", config);
var error = utils.createAxiosError("Network Error", config, undefined, "ERR_NETWORK");
return Promise.reject(error);
});
},
Expand Down
1 change: 1 addition & 0 deletions test/network_error.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ describe("networkError spec", function () {
function (error) {
expect(error.config).to.exist;
expect(error.response).to.not.exist;
expect(error.code).to.equal("ERR_NETWORK");
expect(error.message).to.equal("Network Error");
expect(error.isAxiosError).to.be.true;
}
Expand Down