import * as tsplus_module_1 from "@effect/core/io/Layer/operations/fail";
import * as tsplus_module_2 from "@effect/core/io/Layer/operations/catchAll";
/**
 * Returns a layer with its error channel mapped using the specified function.
 *
 * @tsplus fluent ets/Layer mapError
 */

export function mapError_(self, f) {
  return tsplus_module_2.catchAll_(self, e => tsplus_module_1.fail(() => f(e)));
}
/**
 * Returns a layer with its error channel mapped using the specified function.
 *
 * @tsplus static ets/Layer/Aspects mapError
 */

export const mapError = f => self => mapError_(self, f);
//# sourceMappingURL=mapError.mjs.map