1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
1
Hi Paul,
From AWS SDK PHP reference below, the client would throw a RekognitionException, and "ResourceNotFoundException" is the errorType within the exception.
Could you try if the following modification works?
try {
$result = $aws_client->client->describeCollection([ 'CollectionId' => $collection_id, // REQUIRED ]);
} catch( RekognitionException $e ) {
$errortype = $e->getAwsErrorType();
return;
}
répondu il y a 3 mois
Contenus pertinents
- demandé il y a 6 mois
- demandé il y a un an
- demandé il y a 7 mois
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a un an
Did you use the correct full namespace Aws\Rekognition\Exception\RekognitionException?
use Aws\Rekognition\Exception\RekognitionException as RekognitionException;
Hi, Thanks for your response. I tried your suggestion but, unfortunately, I got the same error message. Note, that the code works fine with a valid collection ID. In response to your latest comment, I added the namespace as suggested. At least, it stopped crashing, but still doesn't throw an exception. It continues past the call to describeCollection(), and continues as if there's no error.