Handle no internet access edge case on StoreKit 2

Is there a way to programmatically know if the user cant access their currentEntitlements due to an internet error (or any other error really) in StoreKit 2? If a user has no internet access when they first open an app, and they had previously purchased some items for this app on another device, they will not get access to these items on the device with no internet. This makes perfect sense, but we should have a way to inform the user this is the reason they can't access their items.

When this happens I get the following error in Xcode:

Error enumerating all current transactions: Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={AMSStatusCode=0, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <33FA368E-0213-4D4D-AF53-C93CE9E32018>.<1>, NSErrorFailingURLKey=https://mzstorekit-sb.itunes.apple.com/inApps/v1/history?guid=00008027-001970E00185002E&reason=initial, _kCFStreamErrorDomainKey=1, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <33FA368E-0213-4D4D-AF53-C93CE9E32018>.<1>"
), NSLocalizedDescription=The Internet connection appears to be offline., NSErrorFailingURLStringKey=https://mzstorekit-sb.itunes.apple.com/inApps/v1/history?guid=00008027-001970E00185002E&reason=initial, NSUnderlyingError=0x281c314d0 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_NSURLErrorNWPathKey_desc=unsatisfied (No network route), _kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _kCFStreamErrorCodeKey=50}

Which is great, but I can't catch it anywere in my code to trigger UI changes. Do you know how could I catch this error?

Thanks!