Skip to content

Commit

Permalink
catch errors while waiting until table is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
skyrpex committed Apr 4, 2024
1 parent 3e49820 commit 0eda76b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions dynamodb/dynamodb.sim.w
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,14 @@ pub class Table_sim impl dynamodb_types.ITable {
// Wait until we can describe the table. This is
// to ensure that the table is ready to be used.
util.waitUntil(() => {
client.describeTable({
TableName: tableName,
});
return true;
try {
client.describeTable({
TableName: tableName,
});
return true;
} catch error {
return false;
}
});

state.set("tableName", tableName);
Expand Down

0 comments on commit 0eda76b

Please sign in to comment.