Skip to content

Commit d67b7cf

Browse files
fix(auth): URLError coercion for RetryableError causing session to be deleted (#597)
* Fixes url error coercion * Include non-url errors
1 parent 425a99f commit d67b7cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/Auth/Internal/SessionManager.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ private actor LiveSessionManager {
106106
// Need to do this check here, because not all RetryableError's should be retried.
107107
// URLError conforms to RetryableError, but only a subset of URLError should be retried,
108108
// the same is true for AuthError.
109-
if let error = error as? any RetryableError, error.shouldRetry {
109+
if let error = error as? URLError, error.shouldRetry {
110+
throw error
111+
} else if let error = error as? any RetryableError, error.shouldRetry {
110112
throw error
111113
} else {
112114
remove()

0 commit comments

Comments
 (0)