File tree Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -16,3 +16,4 @@ profile
16
16
* .moved-aside
17
17
DerivedData
18
18
.idea /
19
+ * .patch
Original file line number Diff line number Diff line change @@ -499,6 +499,12 @@ - (void)oauthConnection:(NXOAuth2Connection *)connection didFailWithError:(NSErr
499
499
NSString *body = [[NSString alloc ] initWithData: connection.data encoding: NSUTF8StringEncoding];
500
500
NSLog (@" oauthConnection Error: %@ " , body);
501
501
502
+ NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary: error.userInfo];
503
+ if (connection.data ) {
504
+ [userInfo setObject: connection.data forKey: NXOAuth2ErrorResponseDataKey];
505
+ }
506
+
507
+ NSError *updatedError = [NSError errorWithDomain: error.domain code: error.code userInfo: [NSDictionary dictionaryWithDictionary: userInfo]];
502
508
503
509
if (connection == authConnection) {
504
510
self.authenticating = NO ;
@@ -539,7 +545,7 @@ - (void)oauthConnection:(NXOAuth2Connection *)connection didFailWithError:(NSErr
539
545
}
540
546
541
547
if ([delegate respondsToSelector: @selector (oauthClient:didFailToGetAccessTokenWithError: )]) {
542
- [delegate oauthClient: self didFailToGetAccessTokenWithError: error ];
548
+ [delegate oauthClient: self didFailToGetAccessTokenWithError: updatedError ];
543
549
}
544
550
}
545
551
}
Original file line number Diff line number Diff line change @@ -106,4 +106,4 @@ typedef enum {
106
106
107
107
108
108
extern NSString * const NXOAuth2AccountStoreErrorKey;
109
-
109
+ extern NSString * const NXOAuth2ErrorResponseDataKey;
Original file line number Diff line number Diff line change 38
38
#pragma mark UserInfo Keys
39
39
40
40
NSString * const NXOAuth2AccountStoreErrorKey = @" NXOAuth2AccountStoreErrorKey" ;
41
+ NSString * const NXOAuth2ErrorResponseDataKey = @" NXOAuth2ErrorResponseDataKey" ;
You can’t perform that action at this time.
0 commit comments