Skip to content

Improve publish error message when public network access is disabled#4807

Merged
liliankasem merged 4 commits intomainfrom
copilot/improve-error-message-publishing
Feb 24, 2026
Merged

Improve publish error message when public network access is disabled#4807
liliankasem merged 4 commits intomainfrom
copilot/improve-error-message-publishing

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 23, 2026

Deployments to Function Apps with public network access disabled (now the portal default) fail with the cryptic The SSL connection could not be established, see inner exception. — no context, no remediation path.

Changes

  • Constants.Errors.PublishNetworkingError — new constant with an actionable message pointing to https://learn.microsoft.com/azure/azure-functions/functions-networking-options
  • PublishFunctionAppAction.RunAsync() — wraps PublishFunctionApp/PublishLocalAppSettings in a try/catch (HttpRequestException) that re-throws as CliException with the improved message + original error detail
  • release_notes.md — added entry for this improvement referencing PR Improve publish error message when public network access is disabled #4807

HttpRequestException is only raised for transport-level failures (SSL, socket, DNS); HTTP 4xx/5xx are already caught upstream by CheckResponseStatusAsync as CliException, so this catch is scoped correctly.

Before:

The SSL connection could not be established, see inner exception.

After:

Unable to connect to the Azure Function App. If public network access is disabled for this app,
ensure you are deploying from an authorized network. For more information, see
https://learn.microsoft.com/azure/azure-functions/functions-networking-options
Details: The SSL connection could not be established, see inner exception.

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • I have added all required tests (Unit tests, E2E tests)

Additional information

The error message directs users to the official Azure Functions networking options documentation at https://learn.microsoft.com/azure/azure-functions/functions-networking-options, which covers VNet integration, private endpoints, and IP restrictions.

Original prompt

This section details on the original issue you should resolve

<issue_title>Publish action error message improvement</issue_title>
<issue_description>When public networking is disabled (which is now the default in the portal create flow), deployments from core tools fail with an unhelpful error message, just "see inner exception" with no actionable detail. It would be helpful to improve this message, perhaps by including an aka.ms link listing common deployment issues and their resolutions.

Image</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

When public networking is disabled for an Azure Function App, deployments
fail with the unhelpful 'The SSL connection could not be established, see
inner exception.' message.

This change:
- Adds PublishNetworkingError constant with an improved message explaining
  the likely cause and an aka.ms link for guidance
- Wraps publish operations in RunAsync() with an HttpRequestException catch
  that provides the improved error message while preserving the original
  error details

Co-authored-by: liliankasem <2198905+liliankasem@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve publish action error message for deployments Improve publish error message when public network access is disabled Feb 23, 2026
@liliankasem liliankasem marked this pull request as ready for review February 23, 2026 22:16
@liliankasem liliankasem requested a review from a team as a code owner February 23, 2026 22:16
Co-authored-by: liliankasem <2198905+liliankasem@users.noreply.github.com>
@liliankasem liliankasem merged commit edd10ec into main Feb 24, 2026
35 of 39 checks passed
@liliankasem liliankasem deleted the copilot/improve-error-message-publishing branch February 24, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish action error message improvement

4 participants