How can i check if my Alamofire request Failed because of bad internet connection? I get an error but how can i know that it failed because of that

> 
> Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={\_kCFStreamErrorCodeKey=-4, NSUnderlyingError=0x6000007fe6a0 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey={length = 28, capacity = 28, bytes = 0x1c1e1f96000000000000000000000000 ... 0000000100000000}, \_kCFStreamErrorCodeKey=-4, \_kCFStreamErrorDomainKey=4}}, \_NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask .<1>, \_NSURLErrorRelatedURLSessionTaskErrorKey=(
>  "LocalUploadTask .<1>"
>  )
> 
> 
>