lib/aws-sdk-sesv2/errors.rb in aws-sdk-sesv2-1.2.0 vs lib/aws-sdk-sesv2/errors.rb in aws-sdk-sesv2-1.3.0
- old
+ new
@@ -4,11 +4,154 @@
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
#
# WARNING ABOUT GENERATED CODE
module Aws::SESV2
+
+ # When SESV2 returns an error response, the Ruby SDK constructs and raises an error.
+ # These errors all extend Aws::SESV2::Errors::ServiceError < {Aws::Errors::ServiceError}
+ #
+ # You can rescue all SESV2 errors using ServiceError:
+ #
+ # begin
+ # # do stuff
+ # rescue Aws::SESV2::Errors::ServiceError
+ # # rescues all SESV2 API errors
+ # end
+ #
+ #
+ # ## Request Context
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
+ # information about the request that generated the error.
+ # See {Seahorse::Client::RequestContext} for more information.
+ #
+ # ## Error Classes
+ # * {AccountSuspendedException}
+ # * {AlreadyExistsException}
+ # * {BadRequestException}
+ # * {ConcurrentModificationException}
+ # * {InvalidNextTokenException}
+ # * {LimitExceededException}
+ # * {MailFromDomainNotVerifiedException}
+ # * {MessageRejected}
+ # * {NotFoundException}
+ # * {SendingPausedException}
+ # * {TooManyRequestsException}
+ #
+ # Additionally, error classes are dynamically generated for service errors based on the error code
+ # if they are not defined above.
module Errors
extend Aws::Errors::DynamicErrors
+
+ class AccountSuspendedException < ServiceError
+
+ # @param [Seahorse::Client::RequestContext] context
+ # @param [String] message
+ # @param [Aws::SESV2::Types::AccountSuspendedException] data
+ def initialize(context, message, data = Aws::EmptyStructure.new)
+ super(context, message, data)
+ end
+ end
+
+ class AlreadyExistsException < ServiceError
+
+ # @param [Seahorse::Client::RequestContext] context
+ # @param [String] message
+ # @param [Aws::SESV2::Types::AlreadyExistsException] data
+ def initialize(context, message, data = Aws::EmptyStructure.new)
+ super(context, message, data)
+ end
+ end
+
+ class BadRequestException < ServiceError
+
+ # @param [Seahorse::Client::RequestContext] context
+ # @param [String] message
+ # @param [Aws::SESV2::Types::BadRequestException] data
+ def initialize(context, message, data = Aws::EmptyStructure.new)
+ super(context, message, data)
+ end
+ end
+
+ class ConcurrentModificationException < ServiceError
+
+ # @param [Seahorse::Client::RequestContext] context
+ # @param [String] message
+ # @param [Aws::SESV2::Types::ConcurrentModificationException] data
+ def initialize(context, message, data = Aws::EmptyStructure.new)
+ super(context, message, data)
+ end
+ end
+
+ class InvalidNextTokenException < ServiceError
+
+ # @param [Seahorse::Client::RequestContext] context
+ # @param [String] message
+ # @param [Aws::SESV2::Types::InvalidNextTokenException] data
+ def initialize(context, message, data = Aws::EmptyStructure.new)
+ super(context, message, data)
+ end
+ end
+
+ class LimitExceededException < ServiceError
+
+ # @param [Seahorse::Client::RequestContext] context
+ # @param [String] message
+ # @param [Aws::SESV2::Types::LimitExceededException] data
+ def initialize(context, message, data = Aws::EmptyStructure.new)
+ super(context, message, data)
+ end
+ end
+
+ class MailFromDomainNotVerifiedException < ServiceError
+
+ # @param [Seahorse::Client::RequestContext] context
+ # @param [String] message
+ # @param [Aws::SESV2::Types::MailFromDomainNotVerifiedException] data
+ def initialize(context, message, data = Aws::EmptyStructure.new)
+ super(context, message, data)
+ end
+ end
+
+ class MessageRejected < ServiceError
+
+ # @param [Seahorse::Client::RequestContext] context
+ # @param [String] message
+ # @param [Aws::SESV2::Types::MessageRejected] data
+ def initialize(context, message, data = Aws::EmptyStructure.new)
+ super(context, message, data)
+ end
+ end
+
+ class NotFoundException < ServiceError
+
+ # @param [Seahorse::Client::RequestContext] context
+ # @param [String] message
+ # @param [Aws::SESV2::Types::NotFoundException] data
+ def initialize(context, message, data = Aws::EmptyStructure.new)
+ super(context, message, data)
+ end
+ end
+
+ class SendingPausedException < ServiceError
+
+ # @param [Seahorse::Client::RequestContext] context
+ # @param [String] message
+ # @param [Aws::SESV2::Types::SendingPausedException] data
+ def initialize(context, message, data = Aws::EmptyStructure.new)
+ super(context, message, data)
+ end
+ end
+
+ class TooManyRequestsException < ServiceError
+
+ # @param [Seahorse::Client::RequestContext] context
+ # @param [String] message
+ # @param [Aws::SESV2::Types::TooManyRequestsException] data
+ def initialize(context, message, data = Aws::EmptyStructure.new)
+ super(context, message, data)
+ end
+ end
end
end