Skip to content

Commit

Permalink
Merge pull request #61 from felix-dumit/error-description
Browse files Browse the repository at this point in the history
extract error description from url
  • Loading branch information
jeyben committed Jun 22, 2015
2 parents 701b31d + f99e1e6 commit 7411b0b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion IOSLinkedInAPI/LIALinkedInAuthorizationViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)
if (accessDenied) {
self.cancelCallback();
} else {
NSError *error = [[NSError alloc] initWithDomain:kLinkedInErrorDomain code:1 userInfo:[[NSMutableDictionary alloc] init]];
NSString* errorDescription = [self extractGetParameter:@"error_description" fromURLString:url];
NSError *error = [[NSError alloc] initWithDomain:kLinkedInErrorDomain
code:1
userInfo:@{
NSLocalizedDescriptionKey: errorDescription}];
self.failureCallback(error);
}
} else {
Expand Down

0 comments on commit 7411b0b

Please sign in to comment.