diff --git a/src/Endpoint/StorageEndpoint.php b/src/Endpoint/StorageEndpoint.php index 6d80430..884289f 100644 --- a/src/Endpoint/StorageEndpoint.php +++ b/src/Endpoint/StorageEndpoint.php @@ -95,6 +95,9 @@ public function setItem(string $projectEnvironmentId, string $storageType, Stora if (isset($rawResult['data']) && isset($rawResult['data']['success'])) { return $rawResult['data']['success']; } + if (isset($rawResult['errors']) && count($rawResult['errors']) > 0) { + return false; + } throw new \Exception('Invalid response'); } @@ -136,7 +139,9 @@ public function deleteItem(string $projectEnvironmentId, string $storageType, st if (isset($rawItem['data']) && isset($rawItem['data']['success'])) { return $rawItem['data']['success']; } - + if (isset($rawResult['errors']) && count($rawResult['errors']) > 0) { + return false; + } throw new \Exception('Invalid response'); } @@ -188,7 +193,9 @@ public function clearPool(string $projectEnvironmentId, string $storageType, ?st if (isset($rawItem['data']) && isset($rawItem['data']['success'])) { return $rawItem['data']['success']; } - + if (isset($rawResult['errors']) && count($rawResult['errors']) > 0) { + return false; + } throw new \Exception('Invalid response'); } }