Skip to content

Commit 46406ea

Browse files
committed
Import gax error
1 parent 31d9c10 commit 46406ea

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

secretmanager/test/quickstartTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
declare(strict_types=1);
1919

20+
use Google\ApiCore\ApiException as GaxApiException;
2021
use Google\Cloud\SecretManager\V1beta1\SecretManagerServiceClient;
2122
use Google\Cloud\TestUtils\TestTrait;
2223
use PHPUnit\Framework\TestCase;
@@ -39,7 +40,7 @@ public static function tearDownAfterClass()
3940

4041
try {
4142
$client->deleteSecret($name);
42-
} catch (\Google\ApiCore\ApiException $e) {
43+
} catch (GaxApiException $e) {
4344
if ($e->getStatus() != 'NOT_FOUND') {
4445
throw $e;
4546
}

secretmanager/test/secretmanagerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
namespace Google\Cloud\Samples\SecretManager;
2121

22+
use Google\ApiCore\ApiException as GaxApiException;
2223
use Google\Cloud\SecretManager\V1beta1\Replication;
2324
use Google\Cloud\SecretManager\V1beta1\Replication\Automatic;
2425
use Google\Cloud\SecretManager\V1beta1\Secret;
@@ -101,7 +102,7 @@ private static function deleteSecret(string $name)
101102
{
102103
try {
103104
self::$client->deleteSecret($name);
104-
} catch (\Google\ApiCore\ApiException $e) {
105+
} catch (GaxApiException $e) {
105106
if ($e->getStatus() != 'NOT_FOUND') {
106107
throw $e;
107108
}

0 commit comments

Comments
 (0)