Run a side effect on the error without altering the result. Useful for logging failures without interrupting the pipeline.
Dual API — works data-first or curried for use in pipe.
pipe
pipe( chargeCard(order), ResultAsync.tapError(e => logger.error("charge failed", e)), ) Copy
pipe( chargeCard(order), ResultAsync.tapError(e => logger.error("charge failed", e)), )
Run a side effect on the error without altering the result. Useful for logging failures without interrupting the pipeline.
Dual API — works data-first or curried for use in
pipe.