How to use the @shopgate/pwa-core.logger.error function in @shopgate/pwa-core

To help you get started, we’ve selected a few @shopgate/pwa-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 shopgate / pwa / libraries / common / components / I18n / components / Translate / index.jsx View on Github external
const values = childrenArray.reduce((obj, child) => (child.props && child.props.forKey ? {
      ...obj,
      [child.props.forKey]: separator,
    } : obj), { ...params });

    // Split the tokenized string at the separators.
    const stringParts = i18n.text(string, values).split(separator);

    // Create a new array containing the separated chunks of the text and merge the substitutions.
    formatted = stringParts.reduce((result, text, index) => [
      ...result,
      text,
      childrenArray[index],
    ], []);
  } catch (e) {
    logger.error('i18n error for string %s', string, e);
  }

  return (
    <span role="{role}">{formatted}</span>
  );
};
github shopgate / pwa / libraries / common / actions / page / getPageConfig.js View on Github external
.catch((error) => {
        logger.error(error);
        dispatch(actions.errorPageConfig(pageId));
      });
  };
github shopgate / pwa / libraries / common / actions / client / fetchClientInformation.js View on Github external
.catch((error) => {
        logger.error(error);
        dispatch(errorClientInformation());
      });
  };
github shopgate / pwa / libraries / common / actions / user / fetchRegisterUrl.js View on Github external
.catch((error) => {
          logger.error(error);
          dispatch(actions.errorUrl(URL_TYPE_REGISTER));
          reject();
        });
    });
github shopgate / pwa / libraries / common / components / Input / components / MultiLineInput.jsx View on Github external
componentDidUpdate() {
    if (!(this.ref instanceof HTMLElement)) {
      logger.error('Ref is not an HTMLElement');
      return;
    }

    this.ref.style.height = `${this.baseHeight}px`;
    this.ref.style.height = `${this.ref.scrollHeight}px`;
  }
github shopgate / pwa / libraries / common / actions / page / fetchPageConfig.js View on Github external
.catch((error) => {
        logger.error(error);
        dispatch(actions.errorPageConfig(pageId, error.code));
      });
  };
github shopgate / pwa / libraries / common / actions / user / logout.js View on Github external
.catch((error) => {
        logger.error(error);
        dispatch(actions.errorLogout());
      });
  };
github shopgate / pwa / libraries / common / actions / user / login.js View on Github external
if (code === EINVALIDCALL) {
          /**
           * This code is thrown when the login request failed, because the user was already logged
           * in. In that situation the success action can also dispatch to trigger the necessary
           * processes which has to happen after a successful login.
           */
          dispatch(actions.successLogin(redirect, strategy));
        } else if (code === ELEGACYSGCONNECT) {
          /**
           * The app is connected to the shop system via the legacy shopgate connect. Login via
           * the shop system credentials failed and further steps are necessary to login the user.
           */
          dispatch(actions.errorLegacyConnectRegister());
          dispatch(actions.errorLogin([], ELEGACYSGCONNECT));
        } else {
          logger.error(error);
          dispatch(actions.errorLogin([], code));
        }
      });
  };
github shopgate / pwa / libraries / common / actions / menu / fetchMenu.js View on Github external
.catch((error) => {
        logger.error(error);
        dispatch(actions.errorMenu(id));
      });
  };
github shopgate / pwa / libraries / common / actions / user / fetchUser.js View on Github external
.catch((error) => {
        if (error.code !== EACCESS) {
          logger.error(error);
        }

        dispatch(actions.toggleLoggedIn(false));
        dispatch(actions.errorUser(error));
      });
  };