Skip to content

Commit

Permalink
[azeventhubs] Fixing referral to an internal constant in an example (A…
Browse files Browse the repository at this point in the history
…zure#20466)

A customer noticed our example file refers to an constant ErrorCodeOwnershipLost by it's internal/exported name. This is some fallout from the way that we expose the constants using aliases, and autocomplete.
  • Loading branch information
richardpark-msft authored Mar 24, 2023
1 parent d6c27cb commit 8ba0f80
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (

"github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs"
"github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/checkpoints"
"github.com/Azure/azure-sdk-for-go/sdk/messaging/azeventhubs/internal/exported"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/container"
)

Expand Down Expand Up @@ -118,7 +117,7 @@ func processEventsForPartition(partitionClient *azeventhubs.ProcessorPartitionCl
if err != nil && !errors.Is(err, context.DeadlineExceeded) {
var eventHubError *azeventhubs.Error

if errors.As(err, &eventHubError) && eventHubError.Code == exported.ErrorCodeOwnershipLost {
if errors.As(err, &eventHubError) && eventHubError.Code == azeventhubs.ErrorCodeOwnershipLost {
return nil
}

Expand Down

0 comments on commit 8ba0f80

Please sign in to comment.