@azure/storage-blob 12.9.0-beta.3 → 12.9.1-alpha.20220311.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/dist/index.js +271 -11
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/Clients.js +7 -5
- package/dist-esm/storage-blob/src/Clients.js.map +1 -1
- package/dist-esm/storage-blob/src/Pipeline.js +4 -2
- package/dist-esm/storage-blob/src/Pipeline.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js +2 -3
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/storageClientContext.js +1 -1
- package/dist-esm/storage-blob/src/generated/src/storageClientContext.js.map +1 -1
- package/dist-esm/storage-blob/src/index.js +1 -1
- package/dist-esm/storage-blob/src/index.js.map +1 -1
- package/dist-esm/storage-blob/src/models.js +14 -0
- package/dist-esm/storage-blob/src/models.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBearerTokenChallengeAuthenticationPolicy.js +245 -0
- package/dist-esm/storage-blob/src/policies/StorageBearerTokenChallengeAuthenticationPolicy.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js +3 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/constants.js +2 -1
- package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
- package/package.json +6 -6
- package/types/3.1/storage-blob.d.ts +17 -0
- package/types/latest/storage-blob.d.ts +18 -0
@@ -13,7 +13,7 @@ import { rangeToString } from "./Range";
|
|
13
13
|
import { StorageClient } from "./StorageClient";
|
14
14
|
import { Batch } from "./utils/Batch";
|
15
15
|
import { BufferScheduler } from "../../storage-common/src";
|
16
|
-
import { BLOCK_BLOB_MAX_BLOCKS, BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES, BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES, DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES, DEFAULT_BLOCK_BUFFER_SIZE_BYTES, DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS, ETagAny, URLConstants, } from "./utils/constants";
|
16
|
+
import { BlobUsesCustomerSpecifiedEncryptionMsg, BLOCK_BLOB_MAX_BLOCKS, BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES, BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES, DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES, DEFAULT_BLOCK_BUFFER_SIZE_BYTES, DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS, ETagAny, URLConstants, } from "./utils/constants";
|
17
17
|
import { createSpan, convertTracingToRequestOptionsBase } from "./utils/tracing";
|
18
18
|
import { appendToURLPath, appendToURLQuery, extractConnectionStringParts, generateBlockID, getURLParameter, httpAuthorizationToString, isIpEndpointStyle, parseObjectReplicationRecord, setURLParameter, toBlobTags, toBlobTagsString, toQuerySerialization, toTags, } from "./utils/utils.common";
|
19
19
|
import { fsCreateReadStream, fsStat, readStreamToLocalFile, streamToBuffer, } from "./utils/utils.node";
|
@@ -301,12 +301,14 @@ export class BlobClient extends StorageClient {
|
|
301
301
|
}
|
302
302
|
catch (e) {
|
303
303
|
if (e.statusCode === 404) {
|
304
|
-
|
305
|
-
code: SpanStatusCode.ERROR,
|
306
|
-
message: "Expected exception when checking blob existence",
|
307
|
-
});
|
304
|
+
// Expected exception when checking blob existence
|
308
305
|
return false;
|
309
306
|
}
|
307
|
+
else if (e.statusCode === 409 &&
|
308
|
+
e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg) {
|
309
|
+
// Expected exception when checking blob existence
|
310
|
+
return true;
|
311
|
+
}
|
310
312
|
span.setStatus({
|
311
313
|
code: SpanStatusCode.ERROR,
|
312
314
|
message: e.message,
|