Skip to content

Commit

Permalink
add new error code: TokenRevoked (#22723)
Browse files Browse the repository at this point in the history
Add a new error code: TokenRevoked to InternalErrorCode enum for driver
to handle token revocation scenario: should refresh token and reconnect.

Co-authored-by: Yunho <yunho-macbookpro2024@Yunhos-MBP.guest.corp.microsoft.com>
  • Loading branch information
yunho-microsoft and Yunho authored Oct 3, 2024
1 parent 5f9bbe0 commit 9e1f6bf
Show file tree
Hide file tree
Showing 3 changed files with 631 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ export interface INormalizedWholeSummary {

// @internal
export enum InternalErrorCode {
ClusterDraining = "ClusterDraining"
ClusterDraining = "ClusterDraining",
TokenRevoked = "TokenRevoked"
}

// @internal
Expand Down
5 changes: 5 additions & 0 deletions server/routerlicious/packages/services-client/src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ export enum InternalErrorCode {
* The cluster is under draining.
*/
ClusterDraining = "ClusterDraining",

/**
* The token has been revoked.
*/
TokenRevoked = "TokenRevoked",
}

/**
Expand Down
Loading

0 comments on commit 9e1f6bf

Please sign in to comment.