We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading from 0.26.1 to 0.27.2 cause:
The timeoutErrorMessage property in config not work with Node.js, expected custom error message, got "timeout of *ms exceeded"
note: #3580 is a merged/closed issue with the same exact problem
import axios from 'axios'; import nock from 'nock'; const axiosInstance = axios.create({ timeout: 5000, timeoutErrorMessage: 'Custom Timeout Error Message', }); describe('test axios', () => { it('should respect the timeoutErrorMessage property', async () => { nock('http://localhost:4444/') .get('/test') .delayConnection(6000) .reply(200); const axprom = axiosInstance.get('http://localhost:4444/test'); await expect(axprom).rejects.toThrow('Custom Timeout Error Message'); }, 10000); });
Expected: Custom Timeout Error Message Got: timeout of 5000ms exceeded
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
Upgrading from 0.26.1 to 0.27.2 cause:
The timeoutErrorMessage property in config not work with Node.js, expected custom error message, got "timeout of *ms exceeded"
note: #3580 is a merged/closed issue with the same exact problem
To Reproduce
Expected behavior
Expected: Custom Timeout Error Message
Got: timeout of 5000ms exceeded
Environment
Additional context/Screenshots
The text was updated successfully, but these errors were encountered: