-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continuation Token wrapped with Error when Recursive Acl call is inte…
…rrupted (#11716)
- Loading branch information
1 parent
beb900c
commit 2ac4a95
Showing
5 changed files
with
67 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
sdk/storage/storage-file-datalake/src/utils/DataLakeAclChangeFailedError.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
import { RestError } from "@azure/core-http"; | ||
|
||
/** | ||
* An error thrown when an operation is interrupted and can be continued later on. | ||
* | ||
* @export | ||
* @class DataLakeAclChangeFailedError | ||
* @extends {Error} | ||
*/ | ||
export class DataLakeAclChangeFailedError extends Error { | ||
/** | ||
* Continuation token to continue next batch of operations. | ||
* | ||
* @type {string} | ||
* @memberof DataLakeAclChangeFailedError | ||
*/ | ||
public continuationToken?: string; | ||
|
||
/** | ||
* Internal error. | ||
* | ||
* @type {(RestError | Error)} | ||
* @memberof DataLakeAclChangeFailedError | ||
*/ | ||
public internalError: RestError | Error; | ||
|
||
constructor(error: RestError | Error, continuationToken?: string) { | ||
super(error.message); | ||
this.name = "DataLakeAclChangeFailedError"; | ||
this.internalError = error; | ||
this.continuationToken = continuationToken; | ||
Object.setPrototypeOf(this, DataLakeAclChangeFailedError.prototype); | ||
} | ||
} |