import i18next from "i18next";

export const rejectErrorCodeHelper = (errorCode) => {
  const errorMessage = errorCode
    ? i18next.t(`apiErrors.${errorCode}`)
    : i18next.t("apiErrors.SomethingWentWrong");

  return errorMessage;
};
