Parcourir la source

add timeout error message

vbea il y a 2 ans
Parent
commit
187945b17f
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      Strides-APP/app/api/http.js

+ 1 - 0
Strides-APP/app/api/http.js

@@ -11,6 +11,7 @@ export const host = hostUrl;
 const DEBUG = app.debug && !app.product;
 const DEBUG = app.debug && !app.product;
 
 
 Axios.defaults.timeout = 30000;
 Axios.defaults.timeout = 30000;
+Axios.defaults.timeoutErrorMessage = "Connection timeout, please check your network.";
 Axios.interceptors.response.use((response) => {
 Axios.interceptors.response.use((response) => {
   if (DEBUG) {
   if (DEBUG) {
     console.log('-------', response.config.method, response.config.url);
     console.log('-------', response.config.method, response.config.url);