mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Merge pull request #22973 from kreuzerkrieg/Fix_Poco_HTTP_Client
Fix an error handling in Poco HTTP Client for AWS.
This commit is contained in:
commit
4f34bc4e73
@ -259,7 +259,11 @@ void PocoHTTPClient::makeRequestInternal(
|
||||
String error_message;
|
||||
Poco::StreamCopier::copyToString(response_body_stream, error_message);
|
||||
|
||||
response->SetClientErrorType(Aws::Client::CoreErrors::NETWORK_CONNECTION);
|
||||
if (Aws::Http::IsRetryableHttpResponseCode(response->GetResponseCode()))
|
||||
response->SetClientErrorType(Aws::Client::CoreErrors::NETWORK_CONNECTION);
|
||||
else
|
||||
response->SetClientErrorType(Aws::Client::CoreErrors::USER_CANCELLED);
|
||||
|
||||
response->SetClientErrorMessage(error_message);
|
||||
|
||||
if (status_code == 429 || status_code == 503)
|
||||
|
Loading…
Reference in New Issue
Block a user