diff --git a/lix/libstore/s3-binary-cache-store.cc b/lix/libstore/s3-binary-cache-store.cc index adbaa3038..24fbcd9fa 100644 --- a/lix/libstore/s3-binary-cache-store.cc +++ b/lix/libstore/s3-binary-cache-store.cc @@ -159,11 +159,24 @@ class RetryStrategy : public Aws::Client::DefaultRetryStrategy bool ShouldRetry(const Aws::Client::AWSError& error, long attemptedRetries) const override { auto retry = Aws::Client::DefaultRetryStrategy::ShouldRetry(error, attemptedRetries); - if (retry) - printError("AWS error '%s' (%s), will retry in %d ms", - error.GetExceptionName(), - error.GetMessage(), - CalculateDelayBeforeNextRetry(error, attemptedRetries)); + if (retry) { + if (error.GetExceptionName() != "") { + printError( + "AWS error '%s' (%s) on request ID '%s', will retry in %d ms", + error.GetExceptionName(), + error.GetMessage(), + error.GetRequestId(), + CalculateDelayBeforeNextRetry(error, attemptedRetries) + ); + } else { + printError( + "AWS error (error type: %d) on request ID '%s', will retry in %d ms", + error.GetErrorType(), + error.GetRequestId(), + CalculateDelayBeforeNextRetry(error, attemptedRetries) + ); + } + } return retry; } };