plainfp - v0.1.0
    Preparing search index...

    Function tapError

    • Run a side effect on the error without altering the result. Useful for logging failures inside a pipe without interrupting downstream steps.

      Dual API — works data-first or curried for use in pipe.

      Type Parameters

      • T
      • E

      Parameters

      Returns ResultType<T, E>

      pipe(
      validateEmail(input),
      Result.tapError(e => logger.warn("validation failed", e)),
      )
    • Run a side effect on the error without altering the result. Useful for logging failures inside a pipe without interrupting downstream steps.

      Dual API — works data-first or curried for use in pipe.

      Type Parameters

      • E

      Parameters

      • fn: (error: E) => void

      Returns <T>(result: ResultType<T, E>) => ResultType<T, E>

      pipe(
      validateEmail(input),
      Result.tapError(e => logger.warn("validation failed", e)),
      )