Skip to content

AWS SQS ReceiveMessageCommandOutput sometimes returns undefined Messages property #5675

@shawngrona

Description

@shawngrona

Checkboxes for prior research

Describe the bug

When polling, the ReceiveMessageCommandOutput returns undefined for Messages property

Similar issue was described here and fixed/resolved #1394

SDK version number

@aws-sdk/package-name@version, ...

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

v18

Reproduction Steps

const input = {
        QueueUrl: queueUrl,
        MaxNumberOfMessages: 10,
        WaitTimeSeconds: 2,
      };
const result = await client.send(new ReceiveMessageCommand(input));

Observed Behavior

Actual response:

{
  '$metadata': {
    httpStatusCode: 200,
    requestId: '883ab113-c9bc-5e0f-8508-ef098c0f28cf',
    extendedRequestId: undefined,
    cfId: undefined,
    attempts: 1,
    totalRetryDelay: 0
  }
}

Expected Behavior

Expected response:

{
  '$metadata': {
    httpStatusCode: 200,
    requestId: '883ab113-c9bc-5e0f-8508-ef098c0f28cf',
    extendedRequestId: undefined,
    cfId: undefined,
    attempts: 1,
    totalRetryDelay: 0
  },
 Messages: []
}

Possible Solution

No response

Additional Information/Context

Messages is a required property on the response

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.p3This is a minor priority issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions