-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Typescript, SQS.ReceiveMessageRequest.AttributeNames does not allow MessageSystemAttributeName #5403
Comments
Related: aws/aws-sdk#623 |
We want the service to update their model (@yenfryherrerafeliz has an internal ticket open and will relay updates), which generates the types here. Please use a typecast as a workaround until then. We will not likely go back to using open enums, since it is too loose for most models, even though it unfortunately breaks this use case. |
Hello @baumac - I just wanted to follow up here with an update that we're still waiting on a fix from service team and it's currently being worked on (ref: V1073281478). In the meantime, please refer to the workaround mentioned above. Feel free to check back in for updates in the near future. Thanks, |
@aBurmeseDev Is there an estimation on when this issue is going to be fixed? It prevents us from upgrading above version |
Hi @dormesica - thanks for checking in. |
@aBurmeseDev any updates one this? |
Hi everyone - thank you all for your patience. I wanted to share an update that the fix has now been released by service team as of last week and I was able to confirm it with latest version of SDK. |
@aBurmeseDev is it there as of |
@renarsvilnis per the JSDoc comment, the
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Checkboxes for prior research
Describe the bug
The
ReceiveMessageRequest.AttributeNames
only allows values from theAttributeNames
enum, and does not allow values from theMessageSystemAttributeName
enum. This contradicts the docs which listMessageSystemAttributeName
as valid values for theAttributeNames
field.AttributeNames
are defined as:SDK version number
@aws-sdk/client-sqs@3.428.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
v18.18.1
Reproduction Steps
Example code that worked in v3.427.0:
This works because
AttributeNames
is defined as:Observed Behavior
In v3.428.0 the code gives the following error because of the type definition to
AttributeNames
:Expected Behavior
The provided example should work in both
v3.427.0
andv3.428.0
.Possible Solution
The quick fix is to update AttributeNames to accept an Array of both MessageSystemAttributeName and QueueAttributeName i.e define it as
AttributeNames?: (QueueAttributeName | MessageSystemAttributeName)[];
The longer fix might requiring updating every place that uses Attribute names to allow using
MessageSystemAttributeName
,QueueAttributeName
, or both.Additional Information/Context
No response
The text was updated successfully, but these errors were encountered: