mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Fix style check
This commit is contained in:
parent
cb6e5fedc5
commit
0a18a87ad3
@ -650,6 +650,7 @@
|
||||
M(679, IO_URING_SUBMIT_ERROR) \
|
||||
M(690, MIXED_ACCESS_PARAMETER_TYPES) \
|
||||
M(691, UNKNOWN_ELEMENT_OF_ENUM) \
|
||||
M(692, AWS_ERROR) \
|
||||
\
|
||||
M(999, KEEPER_EXCEPTION) \
|
||||
M(1000, POCO_EXCEPTION) \
|
||||
|
@ -25,6 +25,10 @@ namespace DB::S3
|
||||
|
||||
namespace
|
||||
{
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int AWS_ERROR;
|
||||
}
|
||||
|
||||
bool areCredentialsEmptyOrExpired(const Aws::Auth::AWSCredentials & credentials, uint64_t expiration_window_seconds)
|
||||
{
|
||||
@ -143,7 +147,7 @@ Aws::String AWSEC2MetadataClient::getCurrentAvailabilityZone() const
|
||||
String user_agent_string = awsComputeUserAgentString();
|
||||
auto [new_token, response_code] = getEC2MetadataToken(user_agent_string);
|
||||
if (response_code != Aws::Http::HttpResponseCode::OK || new_token.empty())
|
||||
throw DB::Exception(ErrorCodes::S3_ERROR,
|
||||
throw DB::Exception(ErrorCodes::AWS_ERROR,
|
||||
"Failed to token request. HTTP response code: {}", response_code);
|
||||
|
||||
token = new_token;
|
||||
@ -155,7 +159,7 @@ Aws::String AWSEC2MetadataClient::getCurrentAvailabilityZone() const
|
||||
profile_request->SetUserAgent(user_agent_string);
|
||||
const auto result = GetResourceWithAWSWebServiceResult(profile_request);
|
||||
if (result.GetResponseCode() != Aws::Http::HttpResponseCode::OK)
|
||||
throw DB::Exception(ErrorCodes::S3_ERROR,
|
||||
throw DB::Exception(ErrorCodes::AWS_ERROR,
|
||||
"Failed to get availability zone. HTTP response code: {}", result.GetResponseCode());
|
||||
return Aws::Utils::StringUtils::Trim(result.GetPayload().c_str());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user