2
0
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:
Taylor Flatt
2024-09-28 06:04:22 -05:00
committed by GitHub
parent 8f3cde11d2
commit cc3217a612
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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);
});