summaryrefslogtreecommitdiff
path: root/Juick/Model
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Model')
-rw-r--r--Juick/Model/User.m3
1 files changed, 2 insertions, 1 deletions
diff --git a/Juick/Model/User.m b/Juick/Model/User.m
index f5b41f5..94b77c4 100644
--- a/Juick/Model/User.m
+++ b/Juick/Model/User.m
@@ -22,7 +22,8 @@
+(void) throwUnableToLogin:(UIViewController *)view error:(NSError *)error {
UIAlertController *alert = [UIAlertController new];
- [alert setTitle:@"Something went wrong"];
+ NSString *title = error.userInfo[@"url"] ? error.userInfo[@"url"] : @"Something went wrong";
+ [alert setTitle:title];
[alert setMessage:error.localizedDescription];
[alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]];
UIPopoverPresentationController *popover = [alert popoverPresentationController];