Azure / azure-notificationhubs-dotnet

.NET SDK for Azure Notification Hubs
MIT License
70 stars 119 forks source link

Throw UnauthorizedException when connection string is not authorized to perform the given operation #236

Closed pmngo closed 1 year ago

pmngo commented 1 year ago

Fixes #224

When the service returns an HTTP 403/Forbidden response, the SDK throws a confusing QuotaExceededException. To differentiate between being throttled versus a connection string not authorizing the user, the behavior has been updated so we only throw the QuotaExceededException when the response contains the Retry-After header.

Things to consider before you submit the PR: