Closed mhupman closed 10 years ago
Definitely shouldn't be blindingly assigning to NSLocalizedDescriptionKey
like that!
I'm fine with removing it altogether and passing through even nil
errors. I was only concerned with surfacing the value under the @"error"
key.
Ok, I'll work on removing it. It would be nice if the Parse iOS SDK populated the NSUnderlyingErrorKey
with the actual NSError*
object. As it stands, the string representation in @"error"
isn't suitable for user presentation or parsing.
Closed by #17.
PFRACCallbacks.m#L16 looks like it was written to handle a situation where the
NSError*
returned from the ParseSDK didn't set theNSLocalizedDescriptionKey
and instead stuffed the string representation of the underlying error intouserInfo[@"error"]
However, NSErrors returned by ParseSDK 1.2.15+ do have a
localizedDescription
set. So, the question is, should we remove PFRACNormalizeError completely? Alternatively, we could leave it in place but modify it to only handle theerror == nil
case.FWIW, I checked the Parse iOS SDK release notes but didn't see anything about a change in how
NSError
were generated, so I'm assuming this code was originally written as a workaround for a time when Parse SDK errors did not include a localized description.