mapError

inline fun <R> mapError(transform: (E) -> R): Result<T, R>

Transforms the error value, preserving success unchanged and retaining SDK operation context/cause. The retained cause describes the original failure, not the transformed error. Transform exceptions propagate.