Skip to content

Commit

Permalink
bug fix isTimeout logic for more usecases
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmcl committed Mar 25, 2024
1 parent 36d2c27 commit 7b9433f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/KukaiCoreSwift/Services/ErrorHandlingService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ public struct KukaiError: CustomStringConvertible, Error {
Allow the delegate of the error callback the ability to decide what errors to log or not by detecting the high level type of error being generated
*/
public func isTimeout() -> Bool {
return self.underlyingError?.domain == "NSURLErrorDomain" && self.underlyingError?.code == -1001
return (self.subType?.domain == "NSURLErrorDomain" && self.subType?.code == -1001) ||
(self.underlyingError?.domain == "NSURLErrorDomain" && self.underlyingError?.code == -1001)
}
}

Expand Down

0 comments on commit 7b9433f

Please sign in to comment.