Getting non-localized description or key from NSError

55 Views Asked by At

Is there any way to get non-localized key or description from the NSError? I need some way to group errors from API requests and send them back for analytics, but it seems all descriptions or keys that we can get from the NSError are the localized ones.

I have tried the following:

  • getting error.code : error.domain - which is not very helpful since the domain is mostly the same
  • getting error.userInfo[NSDebugDescriptionErrorKey] : error.userInfo[NSURLErrorKey] - both of them are nil, so not very helpful either

At this point I do not think it is possible to do it, but would love to hear other thoughts as well

0

There are 0 best solutions below