How to determine Error response from Swift.Result and Enum

I created a method that uses Swift.Result to return an image and an Error from a URLSession. I also created an Enum for the errors. When a Swift.Result error is returned, how can I tell the difference between the 4 enums? fetchImage(with: url) { (result) in switch result { case .failure(let err): print(err) // how… Read More How to determine Error response from Swift.Result and Enum