17 lines
		
	
	
		
			363 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			363 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
"use strict";
 | 
						|
 | 
						|
class NetworkError extends Error {
 | 
						|
  constructor(error, xhr) {
 | 
						|
    if (xhr === void 0) {
 | 
						|
      xhr = null;
 | 
						|
    }
 | 
						|
 | 
						|
    super(`This looks like a network error, the endpoint might be blocked by an internet provider or a firewall.`);
 | 
						|
    this.cause = error;
 | 
						|
    this.isNetworkError = true;
 | 
						|
    this.request = xhr;
 | 
						|
  }
 | 
						|
 | 
						|
}
 | 
						|
 | 
						|
module.exports = NetworkError; |