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
1616* .moved-aside
1717DerivedData
1818.idea /
19+ * .patch
Original file line number Diff line number Diff line change @@ -499,6 +499,12 @@ - (void)oauthConnection:(NXOAuth2Connection *)connection didFailWithError:(NSErr
499499 NSString *body = [[NSString alloc ] initWithData: connection.data encoding: NSUTF8StringEncoding];
500500 NSLog (@" oauthConnection Error: %@ " , body);
501501
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]];
502508
503509 if (connection == authConnection) {
504510 self.authenticating = NO ;
@@ -539,7 +545,7 @@ - (void)oauthConnection:(NXOAuth2Connection *)connection didFailWithError:(NSErr
539545 }
540546
541547 if ([delegate respondsToSelector: @selector (oauthClient:didFailToGetAccessTokenWithError: )]) {
542- [delegate oauthClient: self didFailToGetAccessTokenWithError: error ];
548+ [delegate oauthClient: self didFailToGetAccessTokenWithError: updatedError ];
543549 }
544550 }
545551 }
Original file line number Diff line number Diff line change @@ -106,4 +106,4 @@ typedef enum {
106106
107107
108108extern NSString * const NXOAuth2AccountStoreErrorKey;
109-
109+ extern NSString * const NXOAuth2ErrorResponseDataKey;
Original file line number Diff line number Diff line change 3838#pragma mark UserInfo Keys
3939
4040NSString * const NXOAuth2AccountStoreErrorKey = @" NXOAuth2AccountStoreErrorKey" ;
41+ NSString * const NXOAuth2ErrorResponseDataKey = @" NXOAuth2ErrorResponseDataKey" ;
You can’t perform that action at this time.
0 commit comments