class Requests {

    public static LiveHttpRequest doOnError(LiveHttpRequest request, Consumer<Throwable> action) {
        return request.newBuilder()
                .body(it -> it.doOnEnd(ifError(action)))
                .build();
    }

    private  Requests();

}