You are viewing documentation for version 1 of the AWS SDK for Ruby. Version 2 documentation can be found here.

Exception: AWS::SQS::Errors::BatchSendError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/aws/sqs/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sent, failures) ⇒ BatchSendError

Returns a new instance of BatchSendError



77
78
79
80
81
# File 'lib/aws/sqs/errors.rb', line 77

def initialize sent, failures
  @sent = sent
  @failures = failures
  super("Failed to send #{failures.size} messages")
end

Instance Attribute Details

#failuresArray<Hash> (readonly)

Returns a list of hashes. Each hash contains information about one message that was not sent.

  • :error_code - identifies the type of failure
  • :error_message - human readable description of the failure
  • :sender_fault - whether the failure was caused by a server fault
  • :message_body - the message body as passed to :batch_send
  • :batch_index - the index in the list of messages passed to batch_send of the failed message.

Returns:

  • (Array<Hash>)

    Returns a list of hashes. Each hash contains information about one message that was not sent.

    • :error_code - identifies the type of failure
    • :error_message - human readable description of the failure
    • :sender_fault - whether the failure was caused by a server fault
    • :message_body - the message body as passed to :batch_send
    • :batch_index - the index in the list of messages passed to batch_send of the failed message.


97
98
99
# File 'lib/aws/sqs/errors.rb', line 97

def failures
  @failures
end

#sentArray<Queue::SentMessage> (readonly)

Returns a list of Queue::SentMessage objects.

Returns:



85
86
87
# File 'lib/aws/sqs/errors.rb', line 85

def sent
  @sent
end