The error returned in azurite is inconsistent with the one in azure cloud when create and resize page blob with invalid page size.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 393
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 36
Description
**Error Description:**
The error returned in azurite is inconsistent with the one in azure cloud when create and resize page blob with invalid page size.
In azure, the error is shown as following:

In azurite, the error is shown as following:

**To Reproduce**
Please run the demo code as following:
```
import {
BlobServiceClient, BlockBlobClient, PageBlobClient
} from "@azure/storage-blob";
import * as assert from "assert"
async function main(){
const blobServiceClient = await BlobServiceClient.fromConnectionString("");
const containerClient = await blobServiceClient.getContainerClient("");
const pageBlobClient = await containerClient.getPageBlobClient("");
try{
await pageBlobClient.create(511);
}catch(err){
console.log(err);
assert.ok((err as any).response.parsedBody.Code === "InvalidHeaderValue");
}
}
main();
```
**Error Track:**
The reason maybe is that the check for create and resize page blob with invalid page size in Azurite is different from the one in Azure. The check code is shown as following:
[https://github.com/Azure/Azurite/blob/master/src/blob/handlers/PageBlobHandler.ts#L75](https://github.com/Azure/Azurite/blob/master/src/blob/handlers/PageBlobHandler.ts#L75)

**Expected Behavior**
The error returned in azurite is consistent with the one in azure cloud when create and resize page blob with invalid page size.
@jongio for notification.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.