This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Alamofire.request(urlString).responseJSON { response in | |
guard case let .failure(error) = response.result else { return } | |
if let error = error as? AFError { | |
switch error { | |
case .invalidURL(let url): | |
print("Invalid URL: \(url) - \(error.localizedDescription)") | |
case .parameterEncodingFailed(let reason): | |
print("Parameter encoding failed: \(error.localizedDescription)") | |
print("Failure Reason: \(reason)") |