How to use the workbox-core/_private/logger.js.logger.error function in workbox-core

To help you get started, we’ve selected a few workbox-core 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 GoogleChrome / workbox / packages / workbox-precaching / src / precache.ts View on Github external
.catch((error: Error) => {
            if (process.env.NODE_ENV !== 'production') {
              logger.error(`Service worker installation failed. It will ` +
              `be retried automatically during the next navigation.`);
            }
            // Re-throw the error to ensure installation fails.
            throw error;
          })
  );
github GoogleChrome / workbox / packages / workbox-routing / src / Router.ts View on Github external
responsePromise = responsePromise.catch((err) => {
        if (process.env.NODE_ENV !== 'production') {
          // Still include URL here as it will be async from the console group
          // and may not make sense without the URL
          logger.groupCollapsed(`Error thrown when responding to: ` +
            ` ${getFriendlyURL(url)}. Falling back to Catch Handler.`);
          logger.error(`Error thrown by:`, route);
          logger.error(err);
          logger.groupEnd();
        }
        return this._catchHandler!.handle({url, request, event});
      });
    }
github GoogleChrome / workbox / packages / workbox-routing / src / Router.ts View on Github external
responsePromise = responsePromise.catch((err) => {
        if (process.env.NODE_ENV !== 'production') {
          // Still include URL here as it will be async from the console group
          // and may not make sense without the URL
          logger.groupCollapsed(`Error thrown when responding to: ` +
            ` ${getFriendlyURL(url)}. Falling back to Catch Handler.`);
          logger.error(`Error thrown by:`, route);
          logger.error(err);
          logger.groupEnd();
        }
        return this._catchHandler!.handle({url, request, event});
      });
    }
github GoogleChrome / workbox / packages / workbox-streams / src / concatenate.ts View on Github external
}).catch((error) => {
            if (process.env.NODE_ENV !== 'production') {
              logger.error('An error occurred:', error);
            }
            streamDeferred.reject!(error);
            throw error;
          });
    },