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.532 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.531 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.530 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.529 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.528 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.527 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.526 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.525 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.524 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.523 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.522 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.521 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.520 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.519 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.518 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.517 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.516 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.515 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.514 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-2.11.513 lib/seahorse/client/plugins/raise_response_errors.rb