Reputation: 1098
I'm running an update item statement to update a item in a table. I'm accessing dynamoDB via AWS SDK for PHP. But at the end of the execution how do I know whether the particular update has been successfully completed. by looking at the returned results.
eg:-
$response = $client->updateItem(....)
//How do I do this properly
if($response == 'successfull'){
}
else{
....
}
Upvotes: 0
Views: 952
Reputation: 6527
You can assume success, unless an exception is thrown.
try {
$result = $client->updateItem(...);
} catch (\Aws\DynamoDb\Exception\DynamoDbException $e) {
// handle error
}
// handle result
Here are more details from the AWS SDK for PHP User Guide.
Upvotes: 1