Integrations: Manage the error of provided integrations server not responding

This commit is contained in:
manuroe
2019-06-21 15:06:41 +02:00
parent 9699df26a2
commit 5b6489c8d2
4 changed files with 15 additions and 2 deletions
+8 -1
View File
@@ -548,10 +548,17 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain";
}
} failure:^(NSError *error) {
NSLog(@"[WidgetManager] registerForScalarToken. Error in modular/register request");
NSLog(@"[WidgetManager] registerForScalarToken: Failed to register. Error: %@", error);
if (failure)
{
// Specialise the error
NSError *error = [NSError errorWithDomain:WidgetManagerErrorDomain
code:WidgetManagerErrorCodeFailedToConnectToIntegrationsServer
userInfo:@{
NSLocalizedDescriptionKey: NSLocalizedStringFromTable(@"widget_integrations_server_failed_to_connect", @"Vector", nil)
}];
failure(error);
}
}];