Skip to content

Commit efd4692

Browse files
committed
Fix uncaught error in node http client
- Fix issue with node http client, where the promise of the http call does not complete(via resolve or reject), but instead throws an uncaught error, that cannot be handled in convenient way - Bump version to 3.9.0-M1.1 Signed-off-by: Vasil Vasilev <[email protected]>
1 parent 5913a4b commit efd4692

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

javascript/lerna.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3+
"useWorkspaces": true,
34
"command": {
45
"publish": {
56
"ignoreChanges": [

javascript/lib/node/src/node-http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export class NodeRequester implements HttpRequester {
7575
const requestOptions = this.buildRequest(method, parsedUrl, header, payload, isSecureRequest);
7676
const req = client.request(requestOptions, NodeRequester.createResponseHandler(resolve, reject));
7777
req.on('error', e => {
78-
throw new Error(String(e));
78+
reject(new Error(String(e)));
7979
});
8080
if (payload !== undefined) {
8181
req.write(payload);

0 commit comments

Comments
 (0)