Skip to content

Commit

Permalink
fix: updated stream aborted error message to be more clear (#6615)
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorflatt authored Sep 28, 2024
1 parent 8f3cde1 commit cc3217a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/adapters/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
}

const err = new AxiosError(
'maxContentLength size of ' + config.maxContentLength + ' exceeded',
'stream has been aborted',
AxiosError.ERR_BAD_RESPONSE,
config,
lastRequest
Expand Down
2 changes: 1 addition & 1 deletion test/unit/adapters/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -1642,7 +1642,7 @@ describe('supports http with nodejs', function () {
assert.strictEqual(success, false, 'request should not succeed');
assert.strictEqual(failure, true, 'request should fail');
assert.strictEqual(error.code, 'ERR_BAD_RESPONSE');
assert.strictEqual(error.message, 'maxContentLength size of -1 exceeded');
assert.strictEqual(error.message, 'stream has been aborted');
done();
}).catch(done);
});
Expand Down

0 comments on commit cc3217a

Please sign in to comment.