Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle all errors during an update job #10762

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

brettfo
Copy link
Contributor

@brettfo brettfo commented Oct 9, 2024

While adding error handling last week I missed a spot to catch a generic Exception and report it up the chain; this fixes that.

Previously, the telemetry would classify a whole variety of failures under the category Dependabot::SharedHelpers::HelperSubprocessFailed: No dotnet-tools.json file found. due to the first line in the command's output. Now we'll get properly grouped failures.

I found in the logs where a NuGet server returned a 500 and that made NuGet fail miserably but made for a great test case.

@github-actions github-actions bot added the L: dotnet:nuget NuGet packages via nuget or dotnet label Oct 9, 2024

public record ExpectedUpdateOperationResult : UpdateOperationResult
{
public string? ErrorDetailsRegex { get; init; } = null;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual error message can be large, so this gives an easy test target.

@brettfo brettfo marked this pull request as ready for review October 9, 2024 22:41
@brettfo brettfo requested a review from a team as a code owner October 9, 2024 22:41
@sachin-sandhu sachin-sandhu force-pushed the dev/brettfo/nuget-update-catch-error branch from cca185c to 87f1ffc Compare October 11, 2024 19:59
@sachin-sandhu sachin-sandhu merged commit c5b4d03 into main Oct 11, 2024
69 checks passed
@sachin-sandhu sachin-sandhu deleted the dev/brettfo/nuget-update-catch-error branch October 11, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: dotnet:nuget NuGet packages via nuget or dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants