Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
protected async handleFetchError(e: any): Promise {
throw new NetworkError(e);
}
}
let timer = Orbit.globals.setTimeout(() => {
timedOut = true;
reject(new NetworkError(`No fetch response within ${timeout}ms.`));
}, timeout);
this.remote._push = () => {
this.setupNoError();
throw new NetworkError('The network is offline.');
};
}