Sha256: 3ff71cbea13689376326c8edbbe7be2aced61d50ed810716e63a5bbf8e29df2a

Contents?: true

Size: 726 Bytes

Versions: 203

Compression:

Stored size: 726 Bytes

Contents

# frozen_string_literal: true

module Seahorse
  module Client
    module Plugins
      class RaiseResponseErrors < Plugin

        option(:raise_response_errors,
          default: true,
          doc_type: 'Boolean',
          docstring: 'When `true`, response errors are raised.')

        # @api private
        class Handler < Client::Handler
          def call(context)
            response = @handler.call(context)
            raise response.error if response.error
            response
          end
        end

        def add_handlers(handlers, config)
          if config.raise_response_errors
            handlers.add(Handler, step: :validate, priority: 95)
          end
        end

      end
    end
  end
end

Version data entries

203 entries across 203 versions & 1 rubygems

Version Path
aws-sdk-core-3.220.2 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.220.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.220.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.219.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.218.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.218.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.217.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.217.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.216.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.216.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.215.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.215.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.214.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.214.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.213.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.212.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.211.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.210.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.209.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.209.0 lib/seahorse/client/plugins/raise_response_errors.rb