NetworkError.js 363 B

1234567891011121314151617
  1. "use strict";
  2. class NetworkError extends Error {
  3. constructor(error, xhr) {
  4. if (xhr === void 0) {
  5. xhr = null;
  6. }
  7. super(`This looks like a network error, the endpoint might be blocked by an internet provider or a firewall.`);
  8. this.cause = error;
  9. this.isNetworkError = true;
  10. this.request = xhr;
  11. }
  12. }
  13. module.exports = NetworkError;