Azurite doesn't support Set Blob Tier operation on lease blob and snapshot blob.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 393
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 36
Description
**Error Description:**
In Azure, it will return error "BlobNotFound" when use Set Blob Tier operation with invalid leaseId or snapshot.
But in Azurite, it will set blob tier successfully in this case.
Azure error is shown as following:

**To Reproduce**
```
import {
BlobServiceClient
} from "@azure/storage-blob";
import * as assert from "assert"
async function main() {
const blobServiceClient = await BlobServiceClient.fromConnectionString("Azurite-https-connectionString");
const containerClient = await blobServiceClient.getContainerClient("");
const blockBlobClient = await containerClient.getBlockBlobClient("");
const fakeVersion = "2020-04-23T03:21:50.5338150Z";
const snapshotBlobClient = blockBlobClient.withSnapshot(fakeVersion);
try{
await snapshotBlobClient.setAccessTier("Cool");
}catch(err){
console.log(err);
assert.ok((err as any).response.parsedBody.Code === "BlobNotFound");
}
}
main();
```
**Error Track:**
The reason maybe is that the parameter leaseId and snapshot are not be processed in Blob Set Tier handler method in azurite. The code is shown as following:
[https://github.com/Azure/Azurite/blob/master/src/blob/handlers/BlobHandler.ts#L872](https://github.com/Azure/Azurite/blob/master/src/blob/handlers/BlobHandler.ts#L872)

**Expected Behavior**
When use Set Blob Tier operation with invalid leaseId or snapshot, it doesn't set blob tier successfully and return the error "BlobNotFound".
@jongio for notification.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.