How to Handle StoreKit Errors to Avoid App Review Rejection?

My app has a standard Swift syntax StoreKit function. When a button is tapped, it opens the AppStore and displays an App pop-up window with other app information. Standard functionality and works perfectly most of the time, tested on multiple iDevices. The issue is when it does not and App Store returns an error code. If an error is returned, I present an alert to the users and ask them to try again later (as most likely, an intermittent connection issue).


The App Review team rejected the app because of the error alert.


I would be most grateful if more experienced developers can advise me how to handle the error scenario (ref code snippet below) so that the App will be approved by the App Review team.


-----------

func openStoreProductWithiTunesItemIdentifier(identifier: String) {
..
     let parameters = [ SKStoreProductParameterITunesItemIdentifier : identifier]
     storeViewController.loadProduct(withParameters: parameters) { [weak self] (loaded, error) -> Void in
     if error != nil {
          // CODE TO SHOW ALERT TO USERs AND ASK THEM TO TRY AGAIN LATER
     }
     if loaded {
     self?.present(storeViewController, animated: true, completion: nil)
     }
..


func request(_ request: SKRequest, didFailWithError error: Error) {
        print("Failed to load app record.")
        print("Error: \(error.localizedDescription)")
    }


https://developer.apple.com/documentation/storekit/handling_errors