Sha256: c354e4aee632c0c925bc113e379e197564a9e339437389b8eaebb133814d9e15

Contents?: true

Size: 565 Bytes

Versions: 203

Compression:

Stored size: 565 Bytes

Contents

module Actions
  module Middleware
    class PropagateCandlepinErrors < Dynflow::Middleware
      def plan(*args)
        propagate_candlepin_errors { pass(*args) }
      end

      def run(*args)
        propagate_candlepin_errors { pass(*args) }
      end

      def finalize(*args)
        propagate_candlepin_errors { pass(*args) }
      end

      private

      def propagate_candlepin_errors
        yield
      rescue RestClient::ExceptionWithResponse => e
        raise(::Katello::Errors::CandlepinError.from_exception(e) || e)
      end
    end
  end
end

Version data entries

203 entries across 203 versions & 1 rubygems

Version Path
katello-4.6.2.1 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.6.2 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.6.1 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.7.0.rc1 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.4.2.2 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.4.2.1 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.4.2 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.5.1 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.6.0 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.6.0.rc2 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.6.0.rc1 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.5.0 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.5.0.rc2 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.4.1 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.5.0.rc1 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.4.0.2 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.4.0.1 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.3.1 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.4.0 app/lib/actions/middleware/propagate_candlepin_errors.rb
katello-4.4.0.rc2 app/lib/actions/middleware/propagate_candlepin_errors.rb