File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Parse/Internal/Commands/CommandRunner/URLSession/Session/TaskDelegate Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,15 @@ - (void)_taskDidFinish {
5151 if (self.error ) {
5252 NSMutableDictionary *errorDictionary = [NSMutableDictionary dictionary ];
5353 errorDictionary[@" code" ] = @(kPFErrorConnectionFailed );
54- errorDictionary[@" error" ] = [self .error localizedDescription ];
5554 errorDictionary[@" originalError" ] = self.error ;
5655 errorDictionary[NSUnderlyingErrorKey ] = self.error ;
5756 errorDictionary[@" temporary" ] = @(self.response .statusCode >= 500 || self.response .statusCode < 400 );
57+
58+ NSString *description = [self .error localizedDescription ] ?: [self .error localizedFailureReason ];
59+ if (description) {
60+ errorDictionary[@" error" ] = description;
61+ }
62+
5863 self.error = [PFErrorUtilities errorFromResult: errorDictionary];
5964 [super _taskDidFinish ];
6065 return ;
You can’t perform that action at this time.
0 commit comments