Catch http error if server is not responding
This commit is contained in:
		
							parent
							
								
									a8cab895db
								
							
						
					
					
						commit
						f0450ea703
					
				@ -39,5 +39,10 @@ function getURL(url, params, callback) {
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    };
 | 
			
		||||
    xhr.send(null);
 | 
			
		||||
 | 
			
		||||
    try {
 | 
			
		||||
        xhr.send(null);
 | 
			
		||||
    } catch (e) {
 | 
			
		||||
        callback({error: e});
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user