How to use the cozy-harvest-lib.KonnectorJobError function in cozy-harvest-lib

To help you get started, weā€™ve selected a few cozy-harvest-lib 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 cozy / cozy.github.io / en / cozy-banks / src / ducks / transactions / TriggerErrorCard.jsx View on Github external
const TriggerErrorCard = ({ index, count, error, className }) => {
  const { t, lang } = useI18n()

  const { bankName, trigger } = error

  const konnError = new KonnectorJobError(trigger.current_state.last_error)
  // We do not have a full konnector object here but we can create a simple
  // one, that is sufficient for getErrorLocaleBound, from the information in
  // the trigger
  const konnector = {
    slug: trigger.message.slug,
    name: bankName
  }

  const errorTitle = getErrorLocaleBound(konnError, konnector, lang, 'title')

  return (

cozy-harvest-lib

Provides logic, modules and components for Cozy's harvest applications.

MIT
Latest version published 11 days ago

Package Health Score

69 / 100
Full package analysis

Similar packages