Azure / azure-sdk-for-python

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/python/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-python.
MIT License
4.62k stars 2.83k forks source link

EventGrid SDK doc string lists the wrong `endpoint` format #30569

Open richardpark-msft opened 1 year ago

richardpark-msft commented 1 year ago

Describe the bug

The doc string for the endpoint parameter for EventGridClient lists the namespace name format as but it should be https://.

Expected behavior

Fix the doc string, and consider if we can improve this error message so it mentions that you're missing the protocol, which I assume could be a common mistake?

azure.core.exceptions.ServiceRequestError: No connection adapters were found for 'ripark-eg1.eastus-1.eventgrid.azure.ne
kashifkhan commented 1 year ago

@richardpark-msft I've seen other clients 'fix' the missing protocol issue by adding it in. Maybe that's the approach we can take here as well as updating docs

richardpark-msft commented 1 year ago

Would that work okay if there were multiple protocols? Or if the user was funneling their traffic through a proxy?

kashifkhan commented 1 year ago

no, that would only work for a single protocol where its well defined like the default for endpoint being https://{topichostname}. For a proxy however I would expect a separate set of kwargs for it (similar to EH) and not via the same param, but even then this works when its a single protocol.