Member | Description | Type |
requestId | Request ID which identifies a request. It is very important for troubleshooting. | string |
statusCode | string | |
errorCode | string | |
errorMessage | string |
<?phprequire dirname(__FILE__) . '/../vendor/autoload.php';$secretId = "SECRETID"; //Replace it with the actual SecretId, which can be viewed and managed at https://console.tencentcloud.com/cam/capi$secretKey = "SECRETKEY"; //Replace it with the actual SecretKey, which can be viewed and managed at https://console.tencentcloud.com/cam/capi$region = "ap-beijing"; //Replace it with the actual region, which can be viewed in the console at https://console.tencentcloud.com/cos5/bucket$cosClient = new Qcloud\\Cos\\Client(array('region' => $region,'schema' => 'https', // Protocol header, which is http by default'credentials'=> array('secretId' => $secretId ,'secretKey' => $secretKey)));try {$cosClient->listBuckets()} catch (Qcloud\\Cos\\Exception\\ServiceResponseException $e) {$statusCode = $e->getStatusCode(); // Get the error code$errorMessage = $e->getMessage(); // Get the error message$requestId = $e->getRequestId(); // Get the requestId corresponding to the error$errorCode = $e->getCosErrorCode(); // Get the error name$request = $e->getRequest(); // Get the entire request$response = $e->getResponse(); // Get the entire responseecho ($e);} catch (\\Exception $e) {}
vendor/guzzlehttp/guzzle-services/src/SchemaValidator.php
.RequestId
) returned when the request error occurs.RequestId
and click Diagnose.
Apakah halaman ini membantu?