Sha256: 3ff71cbea13689376326c8edbbe7be2aced61d50ed810716e63a5bbf8e29df2a

Contents?: true

Size: 726 Bytes

Versions: 190

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

190 entries across 190 versions & 1 rubygems

Version Path
aws-sdk-core-3.190.3 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.190.2 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.190.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.190.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.189.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.188.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.187.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.187.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.186.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.185.2 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.185.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.185.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.184.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.183.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.183.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.182.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.181.1 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.181.0 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.180.3 lib/seahorse/client/plugins/raise_response_errors.rb
aws-sdk-core-3.180.2 lib/seahorse/client/plugins/raise_response_errors.rb