mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 09:02:44 +02:00
Integrations: Manage the error of no configured integrations server
This commit is contained in:
@@ -264,7 +264,7 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain";
|
||||
if (!config.hasUrls)
|
||||
{
|
||||
NSLog(@"[WidgetManager] createJitsiWidgetInRoom: Error: no Integrations Manager API URL for user %@", userId);
|
||||
failure(nil);
|
||||
failure(self.errorForNonConfiguredIntegrationManager);
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -517,7 +517,7 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain";
|
||||
if (!config.hasUrls)
|
||||
{
|
||||
NSLog(@"[WidgetManager] registerForScalarToken: Error: no Integrations Manager API URL for user %@", mxSession.myUser.userId);
|
||||
failure(nil);
|
||||
failure(self.errorForNonConfiguredIntegrationManager);
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -580,7 +580,7 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain";
|
||||
if (!config.hasUrls)
|
||||
{
|
||||
NSLog(@"[WidgetManager] validateScalarToken: Error: no Integrations Manager API URL for user %@", mxSession.myUser.userId);
|
||||
failure(nil);
|
||||
failure(self.errorForNonConfiguredIntegrationManager);
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -700,4 +700,14 @@ NSString *const WidgetManagerErrorDomain = @"WidgetManagerErrorDomain";
|
||||
forKey:@"integrationManagerConfigs"];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Errors
|
||||
|
||||
- (NSError*)errorForNonConfiguredIntegrationManager
|
||||
{
|
||||
return [NSError errorWithDomain:WidgetManagerErrorDomain
|
||||
code:WidgetManagerErrorCodeNoIntegrationsServerConfigured
|
||||
userInfo:@{NSLocalizedDescriptionKey: NSLocalizedStringFromTable(@"widget_no_integrations_server_configured", @"Vector", nil)}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user