API Request timeout issue

I am getting below error randomly and after this error and after this error retry also not working . Need to kill the app to make it work again.
Any suggestions please?

Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={_kCFStreamErrorCodeKey=-2102, NSUnderlyingError=0x280499b30 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <119163AD-88F4-47B6-B270-D3CFF7E754C3>.<11>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <119163AD-88F4-47B6-B270-D3CFF7E754C3>.<11>"
<URL>), NSLocalizedDescription=The request timed out., NSErrorFailingURLStringKey=<URL> NSErrorFailingURLKey=t, _kCFStreamErrorDomainKey=4}
Could you show the code where the error occurs.

May be you have a network issue.
There are a lot of potential causes for a timeout failure like this. The first thing to do is to determine whether the problem is triggered by something internal to your device or by something on the network. I usually do this using a combination of CFNetwork diagnostic logging and a packet trace. The former lets you associate your requests with a TCP connection tuple (the source and destination IP and port) and the latter lets you see what actually happened with that connection.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
API Request timeout issue
 
 
Q