Closed Alexandeer closed 7 years ago
You kidding me ) Try get error.code in .failure. For example for cancel request:
let r = Track.relatedTracks(identifier: 123456) { simpleAPIResponse in
switch simpleAPIResponse. response {
case .success(let tracks):
//do whatever
case .failure(let error):
let nserror = error as NSError
if error.code == -999 {
print("delannoyk")
}
}
}
r.cancel()
@delannoyk, I fixed it for self, but I want to see your a variant
@Alexandeer Hey,
Here's an example: