Skip to content

Commit

Permalink
Merge pull request #447 from microsoft/main
Browse files Browse the repository at this point in the history
Staging - 9/12/24
  • Loading branch information
krschau authored Sep 13, 2024
2 parents 5ab8e12 + 8664939 commit 7474c8d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ parameters:
- release

variables:
MSIXVersion: '0.1700'
MSIXVersion: '0.1800'
solution: '**/GitHubExtension.sln'
appxPackageDir: 'AppxPackages'
testOutputArtifactDir: 'TestResults'
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/CreateBuildInfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Param(
)

$Major = "0"
$Minor = "17"
$Minor = "18"
$Patch = "99" # default to 99 for local builds

$versionSplit = $Version.Split(".");
Expand Down
16 changes: 16 additions & 0 deletions src/GitHubExtension/DataManager/GitHubDataManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
Expand Down Expand Up @@ -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.
Expand Down
9 changes: 9 additions & 0 deletions src/GitHubExtension/DataManager/GitHubDataManagerUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down

0 comments on commit 7474c8d

Please sign in to comment.