Azure / Azure/Azurite

[blob] beginCopyFromURL error response empty body

Open
#291 2 comments 1 reaction 1 assignee Claimed by @blueww View on GitHub
blob-storage NewArch stale
Dominant language
TypeScript
Stars
2.3k
Forks
393
Avg merge
1d 20h
Merged PRs (30d)
36

Description

### Which service(blob, file, queue, table) does this issue concern?
blob
### Which version of the Azurite was used?
3.3.0-preview
### Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
npm
### What's the Node.js version?
v12.13.0
### What problem was encountered?
Unit test failure:
`BlobClient.abortCopyFromClient should failed for a completed copy operation`
```
try {
await newBlobClient.beginCopyFromURL(result.copyId!);
assert.fail(
"AbortCopyFromClient should be failed and throw exception for an completed copy operation."
);
} catch (err) {
assert.ok((err as any).response.parsedBody.Code === "InvalidHeaderValue");
}
```
This case is using a copyId to beginCopyFromURL, so an error is expected. But the difference is azurite returned an empty body.

### Steps to reproduce the issue?
Re-run the test-case.

### Have you found a mitigation/solution?
N/A

### debug.log
```
2019-12-12T10:28:59.070Z f31f7afa-9f3c-4b25-a866-50bc8ee5fc6d error: ErrorMiddleware: Received an error, fill error information to HTTP response
2019-12-12T10:28:59.071Z f31f7afa-9f3c-4b25-a866-50bc8ee5fc6d error: ErrorMiddleware: ErrorName=TypeError ErrorMessage=Invalid URL: 3cba73fc-d8d9-4bac-b930-2d3a8cb2ca05 ErrorStack="TypeError [ERR_INVALID_URL]: Invalid URL: 3cba73fc-d8d9-4bac-b930-2d3a8cb2ca05\n at onParseError (internal/url.js:243:9)\n at new URL (internal/url.js:319:5)\n at BlobHandler.startCopyFromURL (C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\azurite\\dist\\src\\blob\\handlers\\BlobHandler.js:366:21)\n at C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\azurite\\dist\\src\\blob\\generated\\middleware\\HandlerMiddlewareFactory.js:58:18\n at C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\azurite\\dist\\src\\blob\\generated\\ExpressMiddlewareFactory.js:77:63\n at Layer.handle [as handle_request] (C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\express\\lib\\router\\layer.js:95:5)\n at trim_prefix (C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\express\\lib\\router\\index.js:317:13)\n at C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\express\\lib\\router\\index.js:284:7\n at Function.process_params (C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\express\\lib\\router\\index.js:335:12)\n at next (C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\azurite\\node_modules\\express\\lib\\router\\index.js:275:10)\n at runMicrotasks ()\n at processTicksAndRejections (internal/process/task_queues.js:93:5)"
2019-12-12T10:28:59.071Z f31f7afa-9f3c-4b25-a866-50bc8ee5fc6d error: ErrorMiddleware: Set HTTP code: 500
```
[debug.log](https://github.com/Azure/Azurite/files/3955393/debug.log)

### request_id
`4396a275-302c-450d-a3e2-2ebff3cc0da1`

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.