Azure / Azure/Azurite

Azurite doesn't check if continuationToken is valid when use List Containers operation on blob service

Open
#644 2 comments 0 reactions 1 assignee Claimed by @blueww View on GitHub
alignment blob-storage bug NewArch
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 "OutOfRangeInput" when use List Containers operation with invalid continuationToken on blob service.
But in Azurite, it will list containers successfully in this case.
Azure error is shown as following:
![Screenshot 2020-11-19 102408](https://user-images.githubusercontent.com/20970631/99612962-a68e6700-2a51-11eb-91c9-5aedb7ac09f9.png)

**To Reproduce**
The demo code is shown as following:
```
import {
BlobServiceClient
} from "@azure/storage-blob";
import * as assert from "assert"

async function main() {
const blobServiceClient = await BlobServiceClient.fromConnectionString("");
try{
const result = (await blobServiceClient.listContainers().byPage({ continuationToken: "garbage" }).next()).value;
}catch(err){
console.log(err);
assert.ok((err as any).response.parsedBody.Code === "OutOfRangeInput");
}
}

main();
```

**Expected Behavior**
When use List Containers operation with invalid continuationToken on blob service, Azurite return error "OutOfRangeInput".

@jongio for notification.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.