taler-util: reject promise on node http error
This commit is contained in:
parent
f4a651ef32
commit
925ef1f410
@ -170,6 +170,10 @@ export class HttpLibImpl implements HttpRequestLibrary {
|
|||||||
throw new Error(`unsupported protocol ${options.protocol}`);
|
throw new Error(`unsupported protocol ${options.protocol}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
req.on("error", (e: Error) => {
|
||||||
|
reject(e);
|
||||||
|
});
|
||||||
|
|
||||||
if (reqBody) {
|
if (reqBody) {
|
||||||
req.write(new Uint8Array(reqBody));
|
req.write(new Uint8Array(reqBody));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user