static void InitializeTokens(HttpClient httpClient) { var newClientEntry = tokenCache[httpClient] = new Dictionary <UserType, TestToken>(); foreach (var entry in logins) { try { newClientEntry[entry.Key] = TestToken.ProduceInstance(httpClient, entry.Value).Result; } catch (AggregateException ex) when(entry.Key == UserType.DeletableUser && ex.InnerException is ApplicationException) { } } }