How to determine AFError from NSError domain and code

Viewed 12
1 Answers

Conversion to NSError is a Swift implementation detail, so there's no guaranteed behavior. You should capture them more accurately. However, if you really need it, the current conversion behavior encodes cases with associated values first, then cases without. According to that logic, code 8 would be requestRetryFailed. But that determination may change based on Swift version. Best to fix your error logging.

Related