Sha256: 41f7c003c05700f11ab7711281fe90175c5296efcab7d466b76c7514ec823847

Contents?: true

Size: 704 Bytes

Versions: 1062

Compression:

Stored size: 704 Bytes

Contents

module Seahorse
  module Client
    module Plugins

      # @seahorse.client.option [Boolean] :raise_response_errors (true)
      #   When `true`, response errors are raised.
      class RaiseResponseErrors < Plugin

        option(:raise_response_errors, true)

        # @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

1,062 entries across 1,062 versions & 2 rubygems

Version Path
aws-sdk-core-2.11.592 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.591 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.590 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.589 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.588 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.587 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.586 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.585 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.584 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.583 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.582 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.581 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.580 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.579 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.578 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.577 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.576 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.575 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.574 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.573 lib/seahorse/client/plugins/raise_response_errors.rb