diff --git a/lib/adapters/http.js b/lib/adapters/http.js index d465851..70cb5cf 100755 --- a/lib/adapters/http.js +++ b/lib/adapters/http.js @@ -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 diff --git a/test/unit/adapters/http.js b/test/unit/adapters/http.js index 32889ba..6d80ad6 100644 --- a/test/unit/adapters/http.js +++ b/test/unit/adapters/http.js @@ -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); });