Sha256: d78f857ab999388db06863c7e754e47d92ba818931d011b07ffe333b4a8eed04

Contents?: true

Size: 695 Bytes

Versions: 163

Compression:

Stored size: 695 Bytes

Contents

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

163 entries across 163 versions & 1 rubygems

Version Path
aws-sdk-core-3.100.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.99.2 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.99.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.99.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.98.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.97.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.97.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.96.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.96.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.95.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.94.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.94.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.93.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.92.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.91.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.91.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.90.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.90.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.89.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.89.0 lib/seahorse/client/plugins/raise_response_errors.rb