fix: handle DNS resolution errors in extension index retrieval (related to #33691)#33695
fix: handle DNS resolution errors in extension index retrieval (related to #33691)#33695botbikamordehai2-sketch wants to merge 21 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…-enabled` parameters (Azure#33472)
…on` parameter to support identity assignment restrictions (Azure#32214) Co-authored-by: Mohamed Yilmaz Ibrahim <ibrahimmo@microsoft.com>
…ty api-version to 2025-05-31-preview (Azure#33478)
…aintenanceWindow format in default maintenance configuration (Azure#33431)
…update`: Support scheduled events profile via new parameters `--scheduled-events-api-version` and `--enable-all-instance-down` (Azure#33451)
…and resolve API calling redundancy (Azure#33492)
…aming task and run logs (Azure#33486)
|
Hi @botbikamordehai2-sketch, |
️✔️AzureCLI-FullTest
|
❌AzureCLI-BreakingChangeTest
Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:
|
|
Thank you for your contribution @botbikamordehai2-sketch! We will review the pull request and get back to you soon. |
|
@botbikamordehai2-sketch please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
handle DNS resolution errors |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
What
The
get_indexfunction in_index.pyonly catchesrequests.exceptions.ConnectionError,HTTPError, andValueError. When DNS resolution fails (e.g.,urllib3.exceptions.NameResolutionError), it raises an unhandled exception, leading to a crash.Fix
Added
OSErrorto the caught exceptions tuple, which covers DNS resolution failures likesocket.gaierrorandNameResolutionError. This ensures a user-friendly error message is shown instead of a traceback when the endpoint cannot be resolved.Closes #33691