-
Notifications
You must be signed in to change notification settings - Fork 354
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
Fix error message from FindDotNetCliPackage task #6630
Conversation
{ | ||
var extension = Runtime.StartsWith("win") ? "zip" : "tar.gz"; | ||
if (PackageType == "sdk") | ||
catch (HttpRequestException ex) when (ex.Message.Contains("404 (Not Found)")) // 404 means that we successfully hit the server, and it returned 404. This cannot be a network hick-up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
catch (HttpRequestException ex) when (ex.Message.Contains("404 (Not Found)")) // 404 means that we successfully hit the server, and it returned 404. This cannot be a network hick-up | |
catch (HttpRequestException ex) when (ex.Message.Contains("404 (Not Found)")) // 404 means that we successfully hit the server, and it returned 404. This cannot be a network hiccup |
{ | ||
var extension = Runtime.StartsWith("win") ? "zip" : "tar.gz"; | ||
if (PackageType == "sdk") | ||
catch (HttpRequestException ex) when (ex.Message.Contains("404 (Not Found)")) // 404 means that we successfully hit the server, and it returned 404. This cannot be a network hick-up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would REALLY rather we check the result code on line 59, rather than parse the error message. Usually it's a pain to do that, so the catch is ok... but it's just 2 lines higher, and avoid the message parsing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: hiccup.
Hello @alexperovich! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
https://github.com/dotnet/core-eng/issues/11538
With this change issues like dotnet/runtime#44541 will now be much more clear.