mirror of
https://github.com/tenrok/axios.git
synced 2026-06-11 18:02:32 +03:00
fix: updated stream aborted error message to be more clear (#6615)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user