-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Eventgrid] Improve error message when providing wrong authentication #15939
Labels
blocking-release
Blocks release
Client
This issue points to a problem in the data-plane of the library.
Event Grid
Messaging
Messaging crew
Milestone
Comments
rakshith91
added
Client
This issue points to a problem in the data-plane of the library.
Event Grid
labels
Dec 29, 2020
Can you paste a full example with the full stacktrace of this? |
|
That's a bug in this code: azure-sdk-for-python/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_helpers.py Lines 77 to 87 in c2dea16
If all Correct code: def _get_authentication_policy(credential):
if credential is None:
raise ValueError("Parameter 'self._credential' must not be None.")
if isinstance(credential, AzureKeyCredential):
return AzureKeyCredentialPolicy(credential=credential, name=constants.EVENTGRID_KEY_HEADER)
if isinstance(credential, EventGridSharedAccessSignatureCredential):
return EventGridSharedAccessSignatureCredentialPolicy(
credential=credential,
name=constants.EVENTGRID_TOKEN_HEADER
)
raise ValueError("The provided credential should be an instance of EventGridSharedAccessSignatureCredentialPolicy or AzureKeyCredentialPolicy") |
This was referenced Jan 13, 2021
openapi-sdkautomation bot
pushed a commit
to AzureSDKAutomation/azure-sdk-for-python
that referenced
this issue
Sep 15, 2021
[Hub Generated] Review request for Microsoft.LabServices to add version preview/2021-10-01-preview (Azure#15939) * Adds base for updating Microsoft.LabServices from version stable/2018-10-15 to version 2021-10-01-preview * Updates readme * Updates API version in new specs and examples * remove 2018 api spec files * add 2021-10-01-preview spec files from generation * update preview api files in readme.md input * update 2020 -> 2021 in new api version in readme * spelling fixes * fix object body mutability * add type:object where missing * added default error response * tracker resource operation naming and description adding * fix shutdownOnIdleEnabled in examples * fix shutdownonIdle enum in examples * examples update username to adminUser object and remove locations from vmprofile * fix examples for vmprofile * rest of model validaiton fixes * prettier fix * removed skus api from 2021-10-01 version since it's not finished * fix operationresults * small images fix Co-authored-by: Nick Depinet <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
blocking-release
Blocks release
Client
This issue points to a problem in the data-plane of the library.
Event Grid
Messaging
Messaging crew
Upon providing wrong key for authentication during publisher client, we get
This message must improve - perhaps start with insisting on providing an AzureKeyCredential?
The text was updated successfully, but these errors were encountered: