iOS Swift - Networking
What is wrong with this error handling code snippet?
URLSession.shared.dataTask(with: url) { data, response, error in
guard let error = error else {
print("Error: \(error.localizedDescription)")
return
}
print("Success")
}.resume()