How to use the @orbit/data.NetworkError function in @orbit/data

To help you get started, we’ve selected a few @orbit/data examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github orbitjs / orbit / packages / @orbit / jsonapi / src / jsonapi-request-processor.ts View on Github external
protected async handleFetchError(e: any): Promise {
    throw new NetworkError(e);
  }
}
github orbitjs / orbit / packages / @orbit / jsonapi / src / jsonapi-request-processor.ts View on Github external
let timer = Orbit.globals.setTimeout(() => {
          timedOut = true;
          reject(new NetworkError(`No fetch response within ${timeout}ms.`));
        }, timeout);
github sillsdev / web-languageforge / src / SIL.XForge.Scripture / ClientApp / src / xforge-common / strategies / remote-push-fail-strategy.spec.ts View on Github external
this.remote._push = () => {
      this.setupNoError();
      throw new NetworkError('The network is offline.');
    };
  }