diff --git a/app/Service/ServiceTrait/Common/AliStsTrait.php b/app/Service/ServiceTrait/Common/AliStsTrait.php index a82b7de..2bfb953 100644 --- a/app/Service/ServiceTrait/Common/AliStsTrait.php +++ b/app/Service/ServiceTrait/Common/AliStsTrait.php @@ -48,11 +48,11 @@ trait AliStsTrait /** * 获取 ali sts 控制器 * @param $payload - * @return AssumeRoleResponse + * @return AssumeRoleResponse|false * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ - public function getAliStsControls($payload): AssumeRoleResponse + public function getAliStsControls($payload): AssumeRoleResponse|false { $client = $this->createClient(); $assumeRoleRequest = new AssumeRoleRequest($payload); @@ -63,6 +63,7 @@ trait AliStsTrait return $res; } catch (Exception $error) { $this->log->error(__CLASS__.'-'.__FUNCTION__.'-'.__LINE__.':'.$error->getMessage()); + return false; } } } \ No newline at end of file