We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4aea53 commit 1fb577cCopy full SHA for 1fb577c
1 file changed
src/utils/utils.ts
@@ -403,8 +403,8 @@ export const Utils = {
403
chunks.push(chunk);
404
});
405
406
- req.on("error", () => {
407
- reject(new Error("Error parsing request body"));
+ req.on("error", (err: Error) => {
+ reject(err);
408
409
410
req.on("end", () => {
@@ -598,7 +598,7 @@ export const Utils = {
598
}
599
} catch (error: any) {
600
logger.debug("parseRequest: ERROR - ", error);
601
- throw new UniversalApiError("Error parsing request", "ERROR", fullUrl.pathname);
+ throw new UniversalApiError(error instanceof Error ? error : new Error(String(error)), "ERROR", fullUrl.pathname);
602
} finally {
603
!!parserRequest && logger.debug("parseRequest: END");
604
0 commit comments