Skip to content

Commit

Permalink
[service-bus] Rename ServiceBusErrorCode Unauthorized to Unauthorized…
Browse files Browse the repository at this point in the history
…Access (Azure#12571)

This change makes us more consistent with the AMQP condition and the .NET exception.
  • Loading branch information
chradek authored Nov 17, 2020
1 parent 993c7bc commit 17a3aed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sdk/servicebus/service-bus/review/service-bus.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ export type ServiceBusErrorCode =
/**
* The user doesn't have access to the entity.
*/
| "Unauthorized";
| "UnauthorizedAccess";

// @public
export interface ServiceBusMessage {
Expand Down
6 changes: 3 additions & 3 deletions sdk/servicebus/service-bus/src/serviceBusError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export type ServiceBusErrorCode =
/**
* The user doesn't have access to the entity.
*/
| "Unauthorized";
| "UnauthorizedAccess";

/**
* Translation between the MessagingErrorCodes into a ServiceBusCode
Expand All @@ -85,7 +85,7 @@ export const wellKnownMessageCodesToServiceBusCodes: Map<string, ServiceBusError
["ServiceCommunicationError", "ServiceCommunicationProblem"],
["SessionCannotBeLockedError", "SessionCannotBeLocked"],
["SessionLockLostError", "SessionLockLost"],
["UnauthorizedError", "Unauthorized"]
["UnauthorizedError", "UnauthorizedAccess"]
]);

/**
Expand All @@ -108,7 +108,7 @@ export class ServiceBusError extends MessagingError {
* - **ServiceCommunicationProblem**: There was a general communications error encountered when interacting with the Azure Service Bus service.
* - **SessionCannotBeLocked**: The requested session cannot be locked.
* - **SessionLockLost**: The lock on the session has expired. Callers should request the session again.
* - **Unauthorized"**: The user doesn't have access to the entity.
* - **UnauthorizedAccess"**: The user doesn't have access to the entity.
*/
// NOTE: make sure this list and the list above are properly kept in sync.
code: ServiceBusErrorCode;
Expand Down

0 comments on commit 17a3aed

Please sign in to comment.