aws-sdk-js-v3
aws-sdk-js-v3 copied to clipboard
`waitUntilDBInstanceDelete` does not work - waiter errorType pointing to awsQueryError::code rather than ShapeId
Checkboxes for prior research
- [X] I've gone through Developer Guide and API reference
- [X] I've checked AWS Forums and StackOverflow.
- [X] I've searched for previous similar issues and didn't find any solution.
Describe the bug
waitUntilDBInstanceDelete doesn't stop even target DBInstance is deleted
SDK version number
@aws-sdk/client-rds v3.573.0
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
19.1.0
Reproduction Steps
const DBINSTANCE = 'doesnotexist';
const client = new RDSClient(config);
const input = {
DBInstanceIdentifier: DBINSTANCE,
};
await waitUntilDBInstanceDeleted(
{
client: client
},
input
)
console.log('end')
Observed Behavior
It should print end but doesn't stop
Expected Behavior
print end
Possible Solution
https://github.com/aws/aws-sdk-js-v3/blob/ac9ef805060eafa14c87dda8779d3892a749b76f/clients/client-rds/src/waiters/waitForDBInstanceDeleted.ts#L78-L81
I found that exception.name is "DBInstanceNotFoundFault" Not "DBInstanceNotFound"
I think condition should be exception.name && exception.name == "DBInstanceNotFoundFault"
Additional Information/Context
No response
Hi @Eyjafjallaa ,
Thanks for reporting this. I'm able to confirm this issue.
The problem is likely with the smithy-typescript code generator.
Thanks, Ran~
the model's waiter is pointed at "errorType": "DBInstanceNotFound". This is the awsQueryError trait code value and not the error shape id.
Checking with the teams to see whether the service should update the waiter or we should handle this indirection.
ask for an additional matcher:
{
"state": "success",
"matcher": {
"errorType": "DBInstanceNotFound"
}
},
{
"state": "success",
"matcher": {
"errorType": "DBInstanceNotFoundFault"
}
},
Hi @Eyjafjallaa - we've verified and confirmed that this needs to be addressed on service side. I'm going to reach out to RDS service team. (ref: P149786965).
Since there are no pending action items for the SDK team, and this repository is solely dedicated to SDK-related issues, I will proceed to close this case. However, please feel free to contact the service team directly through AWS Support for further updates regarding this change.
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.