Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
xhr.ontimeout = () => reject(new errors.NetworkError('Request timeouted'));
xhr.onerror = () => reject(new errors.NetworkError('Request failed'));
xhr.ontimeout = () => reject(new errors.NetworkError('Request timeouted'));
xhr.onabort = () => reject(new errors.NetworkError('Request aborted'));
xhr.onerror = () => reject(new errors.NetworkError('Request failed'));