mirror of
https://github.com/tenrok/axios.git
synced 2026-06-23 20:40:40 +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(
|
const err = new AxiosError(
|
||||||
'maxContentLength size of ' + config.maxContentLength + ' exceeded',
|
'stream has been aborted',
|
||||||
AxiosError.ERR_BAD_RESPONSE,
|
AxiosError.ERR_BAD_RESPONSE,
|
||||||
config,
|
config,
|
||||||
lastRequest
|
lastRequest
|
||||||
|
|||||||
@@ -1642,7 +1642,7 @@ describe('supports http with nodejs', function () {
|
|||||||
assert.strictEqual(success, false, 'request should not succeed');
|
assert.strictEqual(success, false, 'request should not succeed');
|
||||||
assert.strictEqual(failure, true, 'request should fail');
|
assert.strictEqual(failure, true, 'request should fail');
|
||||||
assert.strictEqual(error.code, 'ERR_BAD_RESPONSE');
|
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();
|
done();
|
||||||
}).catch(done);
|
}).catch(done);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user