diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 258e006..debeb36 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -20,7 +20,7 @@ parameters: - release variables: - MSIXVersion: '0.1700' + MSIXVersion: '0.1800' solution: '**/GitHubExtension.sln' appxPackageDir: 'AppxPackages' testOutputArtifactDir: 'TestResults' diff --git a/build/scripts/CreateBuildInfo.ps1 b/build/scripts/CreateBuildInfo.ps1 index ac0fa3a..2b0b363 100644 --- a/build/scripts/CreateBuildInfo.ps1 +++ b/build/scripts/CreateBuildInfo.ps1 @@ -5,7 +5,7 @@ Param( ) $Major = "0" -$Minor = "17" +$Minor = "18" $Patch = "99" # default to 99 for local builds $versionSplit = $Version.Split("."); diff --git a/src/GitHubExtension/DataManager/GitHubDataManager.cs b/src/GitHubExtension/DataManager/GitHubDataManager.cs index 170e42a..edf2229 100644 --- a/src/GitHubExtension/DataManager/GitHubDataManager.cs +++ b/src/GitHubExtension/DataManager/GitHubDataManager.cs @@ -251,6 +251,16 @@ private async Task UpdateDataStoreAsync(DataStoreOperationParameters parameters, PruneObsoleteData(); SetLastUpdatedInMetaData(); } + catch (HttpRequestException httpEx) + { + // HttpRequestExceptions can happen when internet connection is + // down or various other network issues. + _log.Warning($"Http Request Exception: {httpEx.Message}"); + tx.Rollback(); + + // Rethrow so clients can catch/display appropriate UX. + throw; + } catch (Exception ex) { _log.Error(ex, $"Failed Updating DataStore for: {parameters}"); @@ -331,6 +341,12 @@ private async Task UpdateDataForRepositoryAsync(DataStoreOperationParameters par PruneObsoleteData(); SetLastUpdatedInMetaData(); } + catch (HttpRequestException) + { + // Higher layer will catch and log this. Suppress logging an error for this to keep log clean. + tx.Rollback(); + throw; + } catch (Exception ex) { // This is for catching any other unexpected error as well as any we throw. diff --git a/src/GitHubExtension/DataManager/GitHubDataManagerUpdate.cs b/src/GitHubExtension/DataManager/GitHubDataManagerUpdate.cs index c3944fe..491299b 100644 --- a/src/GitHubExtension/DataManager/GitHubDataManagerUpdate.cs +++ b/src/GitHubExtension/DataManager/GitHubDataManagerUpdate.cs @@ -25,6 +25,15 @@ public static async Task Update() { await UpdateDeveloperPullRequests(); } + catch (HttpRequestException httpEx) + { + // HttpRequestExceptions can happen when internet connection is + // down or various other network issues unrelated to this update. + // This is not an error in the extension or anything we can + // address. Log a warning so it is understood why the update did + // not occur, but otherwise keep the log clean. + _log.Warning($"Http Request Exception: {httpEx.Message}"); + } catch (Exception ex) { _log.Error(ex, "Update failed unexpectedly.");