Azurite doesn’t support error "CannotVerifyCopySource" in Copy Blob From URL operation on 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 "CannotVerifyCopySource" when use Copy Blob From URL operation with invalid blob url.
But in Azurite, it copy blob 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 originBlobClient = await containerClient.getBlockBlobClient("");
const newBlobClient = await containerClient.getBlockBlobClient("");
try{
await newBlobClient.syncCopyFromURL(originBlobClient.url);
}catch(err){
console.log(err);
assert.ok((err as any).response.parsedBody.Code === "CannotVerifyCopySource");
}
}
main();
```
**Error Track**
The reason maybe is that the copyFromURL handler method lacks the error handler for "CannotVerifyCopySource"
The copyFromURL handler method is defined in [https://github.com/Azure/Azurite/blob/master/src/blob/handlers/BlobHandler.ts#L801](https://github.com/Azure/Azurite/blob/master/src/blob/handlers/BlobHandler.ts#L801)
The startCopyFromURL handler method have the error handler which is defined in
[https://github.com/Azure/Azurite/blob/master/src/blob/handlers/BlobHandler.ts#L647](https://github.com/Azure/Azurite/blob/master/src/blob/handlers/BlobHandler.ts#L647)
**Expected Behavior**
When use Copy Blob From URL operation with invalid blob url, it doesn't copy blob successfully and return error "CannotVerifyCopySource" in Azurite.
@jongio for notification.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.