method Stream.tapErr Stream.tapErr(fn: (error: E) => Promisable<void>): Stream<T, E> Runs a side-effect function on each error without transforming it. If the provided function throws an error or returns a rejected promise, the new error replaces the original. Examples Example 1 const stream = source.tapErr((error) => console.error("Error:", error)); Parameters fn: (error: E) => Promisable<void> Return Type Stream<T, E>