2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-11 18:02:32 +03:00

custom timeout prompt copy (#2275)

* style: ui

* feat: custom timeout txtx

* feat: custom timeout txtx
This commit is contained in:
IVLIU
2019-10-16 09:29:16 +08:00
committed by Felipe Martins
parent ccca5e0e21
commit 6284abfa06
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -88,7 +88,11 @@ module.exports = function xhrAdapter(config) {
// Handle timeout
request.ontimeout = function handleTimeout() {
reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',
var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
if (config.timeoutErrorMessage) {
timeoutErrorMessage = config.timeoutErrorMessage;
}
reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
request));
// Clean up request