added read retry to s3 provider
All checks were successful
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good

This commit is contained in:
2023-11-11 21:04:21 -06:00
parent cc49536755
commit 4e62156b70
2 changed files with 55 additions and 31 deletions

View File

@@ -914,15 +914,15 @@ auto sia_provider::read_file_bytes(const std::string &api_path,
i++) {
long response_code{};
const auto notify_retry = [&]() {
if (response_code) {
if (response_code == 0) {
utils::error::raise_api_path_error(
__FUNCTION__, api_path, response_code,
__FUNCTION__, api_path, api_error::comm_error,
"read file bytes failed|offset|" + std::to_string(offset) +
"|size|" + std::to_string(size) + "|retry|" +
std::to_string(i + 1U));
} else {
utils::error::raise_api_path_error(
__FUNCTION__, api_path, api_error::comm_error,
__FUNCTION__, api_path, response_code,
"read file bytes failed|offset|" + std::to_string(offset) +
"|size|" + std::to_string(size) + "|retry|" +
std::to_string(i + 1U));