Skip to content

Commit

Permalink
add more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dayaffe committed Jan 10, 2025
1 parent f739b53 commit 18030e9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public enum AWSRetryErrorInfoProvider: RetryErrorInfoProvider {
private static let timeoutStatusCodes = [408, 504]

public static func errorInfo(for error: Error) -> RetryErrorInfo? {
let logger = SwiftLogger(label: "RetryLogger")
logger.debug("(RETRYING) got errorInfo for \(error)")

// Determine based on properties if this error is a timeout error.
var isTimeout = false
Expand All @@ -69,7 +71,6 @@ public enum AWSRetryErrorInfoProvider: RetryErrorInfoProvider {
// Handle certain CRT errors as transient errors
if case CommonRunTimeError.crtError(let crtError) = error {
if transientCRTErrorCodes.contains(crtError.code) {
let logger = SwiftLogger(label: "RetryLogger")
logger.debug("RETRYING CRT ERROR CODE: \(crtError.code)")
return RetryErrorInfo(errorType: .transient, retryAfterHint: nil, isTimeout: isTimeout)
}
Expand Down

0 comments on commit 18030e9

Please sign in to comment.