From 2e74b57808628c99ef0cd3e09d0c3df7a99f7a43 Mon Sep 17 00:00:00 2001
From: Mihovil Ilakovac <mihovil@ilakovac.com>
Date: Fri, 22 Nov 2024 12:46:24 +0100
Subject: [PATCH] HttpError type fix

---
 waspc/data/Generator/templates/sdk/wasp/server/HttpError.ts   | 4 ++--
 .../waspBuild-golden/waspBuild/.wasp/build/.waspchecksums     | 2 +-
 .../waspBuild/.wasp/build/sdk/wasp/dist/server/HttpError.d.ts | 2 +-
 .../waspBuild/.wasp/build/sdk/wasp/dist/server/HttpError.js   | 4 ++--
 .../.wasp/build/sdk/wasp/dist/server/HttpError.js.map         | 2 +-
 .../waspBuild/.wasp/build/sdk/wasp/server/HttpError.ts        | 4 ++--
 .../waspBuild/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts   | 2 +-
 .../waspBuild/.wasp/out/sdk/wasp/dist/server/HttpError.js     | 4 ++--
 .../waspBuild/.wasp/out/sdk/wasp/dist/server/HttpError.js.map | 2 +-
 .../waspBuild/.wasp/out/sdk/wasp/server/HttpError.ts          | 4 ++--
 .../waspCompile-golden/waspCompile/.wasp/out/.waspchecksums   | 2 +-
 .../waspCompile/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts | 2 +-
 .../waspCompile/.wasp/out/sdk/wasp/dist/server/HttpError.js   | 4 ++--
 .../.wasp/out/sdk/wasp/dist/server/HttpError.js.map           | 2 +-
 .../waspCompile/.wasp/out/sdk/wasp/server/HttpError.ts        | 4 ++--
 .../waspComplexTest/.wasp/out/.waspchecksums                  | 2 +-
 .../.wasp/out/sdk/wasp/dist/server/HttpError.d.ts             | 2 +-
 .../.wasp/out/sdk/wasp/dist/server/HttpError.js               | 4 ++--
 .../.wasp/out/sdk/wasp/dist/server/HttpError.js.map           | 2 +-
 .../waspComplexTest/.wasp/out/sdk/wasp/server/HttpError.ts    | 4 ++--
 .../waspJob-golden/waspJob/.wasp/out/.waspchecksums           | 2 +-
 .../waspJob/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts     | 2 +-
 .../waspJob/.wasp/out/sdk/wasp/dist/server/HttpError.js       | 4 ++--
 .../waspJob/.wasp/out/sdk/wasp/dist/server/HttpError.js.map   | 2 +-
 .../waspJob/.wasp/out/sdk/wasp/server/HttpError.ts            | 4 ++--
 .../waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums   | 2 +-
 .../waspMigrate/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts | 2 +-
 .../waspMigrate/.wasp/out/sdk/wasp/dist/server/HttpError.js   | 4 ++--
 .../.wasp/out/sdk/wasp/dist/server/HttpError.js.map           | 2 +-
 .../waspMigrate/.wasp/out/sdk/wasp/server/HttpError.ts        | 4 ++--
 30 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/waspc/data/Generator/templates/sdk/wasp/server/HttpError.ts b/waspc/data/Generator/templates/sdk/wasp/server/HttpError.ts
index 6e0fc4c211..d05a2c841b 100644
--- a/waspc/data/Generator/templates/sdk/wasp/server/HttpError.ts
+++ b/waspc/data/Generator/templates/sdk/wasp/server/HttpError.ts
@@ -2,8 +2,8 @@ export class HttpError extends Error {
   public statusCode: number
   public data: unknown
 
-  constructor (statusCode: number, message?: string, data?: Record<string, unknown>, ...params: any[]) {
-    super(message, ...params)
+  constructor (statusCode: number, message?: string, data?: Record<string, unknown>, options?: ErrorOptions) {
+    super(message, options)
 
     if (Error.captureStackTrace) {
       Error.captureStackTrace(this, HttpError)
diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums
index 8cceccf493..95852d62df 100644
--- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums
+++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/.waspchecksums
@@ -214,7 +214,7 @@
             "file",
             "../out/sdk/wasp/server/HttpError.ts"
         ],
-        "5db03b580bebb72a8fbe9ff3b4f7abdf01e9d0eee4a3feabba20983d5c5c56b4"
+        "f375fb45eeb16381b8cc575503db302c005ddaa1b35d837ca0ea043fe8ec6ccb"
     ],
     [
         [
diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/dist/server/HttpError.d.ts b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/dist/server/HttpError.d.ts
index b007210cfe..e40cd74ab7 100644
--- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/dist/server/HttpError.d.ts
+++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/dist/server/HttpError.d.ts
@@ -1,5 +1,5 @@
 export declare class HttpError extends Error {
     statusCode: number;
     data: unknown;
-    constructor(statusCode: number, message?: string, data?: Record<string, unknown>, ...params: any[]);
+    constructor(statusCode: number, message?: string, data?: Record<string, unknown>, options?: ErrorOptions);
 }
diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/dist/server/HttpError.js b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/dist/server/HttpError.js
index 3e216e57ce..6e91977adc 100644
--- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/dist/server/HttpError.js
+++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/dist/server/HttpError.js
@@ -1,6 +1,6 @@
 export class HttpError extends Error {
-    constructor(statusCode, message, data, ...params) {
-        super(message, ...params);
+    constructor(statusCode, message, data, options) {
+        super(message, options);
         if (Error.captureStackTrace) {
             Error.captureStackTrace(this, HttpError);
         }
diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/dist/server/HttpError.js.map b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/dist/server/HttpError.js.map
index 027628d881..8163354e1b 100644
--- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/dist/server/HttpError.js.map
+++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/dist/server/HttpError.js.map
@@ -1 +1 @@
-{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../server/HttpError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAU,SAAQ,KAAK;IAIlC,YAAa,UAAkB,EAAE,OAAgB,EAAE,IAA8B,EAAE,GAAG,MAAa;QACjG,KAAK,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAA;QAEzB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QAC1C,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;QAEjC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,CAAC,EAAE,CAAC;YAC7E,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAE5B,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;IACH,CAAC;CACF"}
\ No newline at end of file
+{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../server/HttpError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAU,SAAQ,KAAK;IAIlC,YAAa,UAAkB,EAAE,OAAgB,EAAE,IAA8B,EAAE,OAAsB;QACvG,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAEvB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QAC1C,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;QAEjC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,CAAC,EAAE,CAAC;YAC7E,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAE5B,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;IACH,CAAC;CACF"}
\ No newline at end of file
diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/server/HttpError.ts b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/server/HttpError.ts
index 6e0fc4c211..d05a2c841b 100644
--- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/server/HttpError.ts
+++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/build/sdk/wasp/server/HttpError.ts
@@ -2,8 +2,8 @@ export class HttpError extends Error {
   public statusCode: number
   public data: unknown
 
-  constructor (statusCode: number, message?: string, data?: Record<string, unknown>, ...params: any[]) {
-    super(message, ...params)
+  constructor (statusCode: number, message?: string, data?: Record<string, unknown>, options?: ErrorOptions) {
+    super(message, options)
 
     if (Error.captureStackTrace) {
       Error.captureStackTrace(this, HttpError)
diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts
index b007210cfe..e40cd74ab7 100644
--- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts
+++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts
@@ -1,5 +1,5 @@
 export declare class HttpError extends Error {
     statusCode: number;
     data: unknown;
-    constructor(statusCode: number, message?: string, data?: Record<string, unknown>, ...params: any[]);
+    constructor(statusCode: number, message?: string, data?: Record<string, unknown>, options?: ErrorOptions);
 }
diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/dist/server/HttpError.js b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/dist/server/HttpError.js
index 3e216e57ce..6e91977adc 100644
--- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/dist/server/HttpError.js
+++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/dist/server/HttpError.js
@@ -1,6 +1,6 @@
 export class HttpError extends Error {
-    constructor(statusCode, message, data, ...params) {
-        super(message, ...params);
+    constructor(statusCode, message, data, options) {
+        super(message, options);
         if (Error.captureStackTrace) {
             Error.captureStackTrace(this, HttpError);
         }
diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/dist/server/HttpError.js.map b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/dist/server/HttpError.js.map
index 027628d881..8163354e1b 100644
--- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/dist/server/HttpError.js.map
+++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/dist/server/HttpError.js.map
@@ -1 +1 @@
-{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../server/HttpError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAU,SAAQ,KAAK;IAIlC,YAAa,UAAkB,EAAE,OAAgB,EAAE,IAA8B,EAAE,GAAG,MAAa;QACjG,KAAK,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAA;QAEzB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QAC1C,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;QAEjC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,CAAC,EAAE,CAAC;YAC7E,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAE5B,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;IACH,CAAC;CACF"}
\ No newline at end of file
+{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../server/HttpError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAU,SAAQ,KAAK;IAIlC,YAAa,UAAkB,EAAE,OAAgB,EAAE,IAA8B,EAAE,OAAsB;QACvG,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAEvB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QAC1C,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;QAEjC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,CAAC,EAAE,CAAC;YAC7E,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAE5B,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;IACH,CAAC;CACF"}
\ No newline at end of file
diff --git a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/server/HttpError.ts b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/server/HttpError.ts
index 6e0fc4c211..d05a2c841b 100644
--- a/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/server/HttpError.ts
+++ b/waspc/e2e-test/test-outputs/waspBuild-golden/waspBuild/.wasp/out/sdk/wasp/server/HttpError.ts
@@ -2,8 +2,8 @@ export class HttpError extends Error {
   public statusCode: number
   public data: unknown
 
-  constructor (statusCode: number, message?: string, data?: Record<string, unknown>, ...params: any[]) {
-    super(message, ...params)
+  constructor (statusCode: number, message?: string, data?: Record<string, unknown>, options?: ErrorOptions) {
+    super(message, options)
 
     if (Error.captureStackTrace) {
       Error.captureStackTrace(this, HttpError)
diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums
index f289916b43..293550bc81 100644
--- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums
+++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/.waspchecksums
@@ -214,7 +214,7 @@
             "file",
             "../out/sdk/wasp/server/HttpError.ts"
         ],
-        "5db03b580bebb72a8fbe9ff3b4f7abdf01e9d0eee4a3feabba20983d5c5c56b4"
+        "f375fb45eeb16381b8cc575503db302c005ddaa1b35d837ca0ea043fe8ec6ccb"
     ],
     [
         [
diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts
index b007210cfe..e40cd74ab7 100644
--- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts
+++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts
@@ -1,5 +1,5 @@
 export declare class HttpError extends Error {
     statusCode: number;
     data: unknown;
-    constructor(statusCode: number, message?: string, data?: Record<string, unknown>, ...params: any[]);
+    constructor(statusCode: number, message?: string, data?: Record<string, unknown>, options?: ErrorOptions);
 }
diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/dist/server/HttpError.js b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/dist/server/HttpError.js
index 3e216e57ce..6e91977adc 100644
--- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/dist/server/HttpError.js
+++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/dist/server/HttpError.js
@@ -1,6 +1,6 @@
 export class HttpError extends Error {
-    constructor(statusCode, message, data, ...params) {
-        super(message, ...params);
+    constructor(statusCode, message, data, options) {
+        super(message, options);
         if (Error.captureStackTrace) {
             Error.captureStackTrace(this, HttpError);
         }
diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/dist/server/HttpError.js.map b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/dist/server/HttpError.js.map
index 027628d881..8163354e1b 100644
--- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/dist/server/HttpError.js.map
+++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/dist/server/HttpError.js.map
@@ -1 +1 @@
-{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../server/HttpError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAU,SAAQ,KAAK;IAIlC,YAAa,UAAkB,EAAE,OAAgB,EAAE,IAA8B,EAAE,GAAG,MAAa;QACjG,KAAK,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAA;QAEzB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QAC1C,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;QAEjC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,CAAC,EAAE,CAAC;YAC7E,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAE5B,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;IACH,CAAC;CACF"}
\ No newline at end of file
+{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../server/HttpError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAU,SAAQ,KAAK;IAIlC,YAAa,UAAkB,EAAE,OAAgB,EAAE,IAA8B,EAAE,OAAsB;QACvG,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAEvB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QAC1C,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;QAEjC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,CAAC,EAAE,CAAC;YAC7E,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAE5B,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;IACH,CAAC;CACF"}
\ No newline at end of file
diff --git a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/server/HttpError.ts b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/server/HttpError.ts
index 6e0fc4c211..d05a2c841b 100644
--- a/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/server/HttpError.ts
+++ b/waspc/e2e-test/test-outputs/waspCompile-golden/waspCompile/.wasp/out/sdk/wasp/server/HttpError.ts
@@ -2,8 +2,8 @@ export class HttpError extends Error {
   public statusCode: number
   public data: unknown
 
-  constructor (statusCode: number, message?: string, data?: Record<string, unknown>, ...params: any[]) {
-    super(message, ...params)
+  constructor (statusCode: number, message?: string, data?: Record<string, unknown>, options?: ErrorOptions) {
+    super(message, options)
 
     if (Error.captureStackTrace) {
       Error.captureStackTrace(this, HttpError)
diff --git a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/.waspchecksums
index c5d1fb55eb..3cbce17094 100644
--- a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/.waspchecksums
+++ b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/.waspchecksums
@@ -501,7 +501,7 @@
             "file",
             "../out/sdk/wasp/server/HttpError.ts"
         ],
-        "5db03b580bebb72a8fbe9ff3b4f7abdf01e9d0eee4a3feabba20983d5c5c56b4"
+        "f375fb45eeb16381b8cc575503db302c005ddaa1b35d837ca0ea043fe8ec6ccb"
     ],
     [
         [
diff --git a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts
index b007210cfe..e40cd74ab7 100644
--- a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts
+++ b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts
@@ -1,5 +1,5 @@
 export declare class HttpError extends Error {
     statusCode: number;
     data: unknown;
-    constructor(statusCode: number, message?: string, data?: Record<string, unknown>, ...params: any[]);
+    constructor(statusCode: number, message?: string, data?: Record<string, unknown>, options?: ErrorOptions);
 }
diff --git a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/dist/server/HttpError.js b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/dist/server/HttpError.js
index 3e216e57ce..6e91977adc 100644
--- a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/dist/server/HttpError.js
+++ b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/dist/server/HttpError.js
@@ -1,6 +1,6 @@
 export class HttpError extends Error {
-    constructor(statusCode, message, data, ...params) {
-        super(message, ...params);
+    constructor(statusCode, message, data, options) {
+        super(message, options);
         if (Error.captureStackTrace) {
             Error.captureStackTrace(this, HttpError);
         }
diff --git a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/dist/server/HttpError.js.map b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/dist/server/HttpError.js.map
index 027628d881..8163354e1b 100644
--- a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/dist/server/HttpError.js.map
+++ b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/dist/server/HttpError.js.map
@@ -1 +1 @@
-{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../server/HttpError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAU,SAAQ,KAAK;IAIlC,YAAa,UAAkB,EAAE,OAAgB,EAAE,IAA8B,EAAE,GAAG,MAAa;QACjG,KAAK,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAA;QAEzB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QAC1C,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;QAEjC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,CAAC,EAAE,CAAC;YAC7E,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAE5B,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;IACH,CAAC;CACF"}
\ No newline at end of file
+{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../server/HttpError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAU,SAAQ,KAAK;IAIlC,YAAa,UAAkB,EAAE,OAAgB,EAAE,IAA8B,EAAE,OAAsB;QACvG,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAEvB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QAC1C,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;QAEjC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,CAAC,EAAE,CAAC;YAC7E,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAE5B,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;IACH,CAAC;CACF"}
\ No newline at end of file
diff --git a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/server/HttpError.ts b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/server/HttpError.ts
index 6e0fc4c211..d05a2c841b 100644
--- a/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/server/HttpError.ts
+++ b/waspc/e2e-test/test-outputs/waspComplexTest-golden/waspComplexTest/.wasp/out/sdk/wasp/server/HttpError.ts
@@ -2,8 +2,8 @@ export class HttpError extends Error {
   public statusCode: number
   public data: unknown
 
-  constructor (statusCode: number, message?: string, data?: Record<string, unknown>, ...params: any[]) {
-    super(message, ...params)
+  constructor (statusCode: number, message?: string, data?: Record<string, unknown>, options?: ErrorOptions) {
+    super(message, options)
 
     if (Error.captureStackTrace) {
       Error.captureStackTrace(this, HttpError)
diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums
index 0a5ecd1476..7bed10bec0 100644
--- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums
+++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/.waspchecksums
@@ -221,7 +221,7 @@
             "file",
             "../out/sdk/wasp/server/HttpError.ts"
         ],
-        "5db03b580bebb72a8fbe9ff3b4f7abdf01e9d0eee4a3feabba20983d5c5c56b4"
+        "f375fb45eeb16381b8cc575503db302c005ddaa1b35d837ca0ea043fe8ec6ccb"
     ],
     [
         [
diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts
index b007210cfe..e40cd74ab7 100644
--- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts
+++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts
@@ -1,5 +1,5 @@
 export declare class HttpError extends Error {
     statusCode: number;
     data: unknown;
-    constructor(statusCode: number, message?: string, data?: Record<string, unknown>, ...params: any[]);
+    constructor(statusCode: number, message?: string, data?: Record<string, unknown>, options?: ErrorOptions);
 }
diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/dist/server/HttpError.js b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/dist/server/HttpError.js
index 3e216e57ce..6e91977adc 100644
--- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/dist/server/HttpError.js
+++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/dist/server/HttpError.js
@@ -1,6 +1,6 @@
 export class HttpError extends Error {
-    constructor(statusCode, message, data, ...params) {
-        super(message, ...params);
+    constructor(statusCode, message, data, options) {
+        super(message, options);
         if (Error.captureStackTrace) {
             Error.captureStackTrace(this, HttpError);
         }
diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/dist/server/HttpError.js.map b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/dist/server/HttpError.js.map
index 027628d881..8163354e1b 100644
--- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/dist/server/HttpError.js.map
+++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/dist/server/HttpError.js.map
@@ -1 +1 @@
-{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../server/HttpError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAU,SAAQ,KAAK;IAIlC,YAAa,UAAkB,EAAE,OAAgB,EAAE,IAA8B,EAAE,GAAG,MAAa;QACjG,KAAK,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAA;QAEzB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QAC1C,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;QAEjC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,CAAC,EAAE,CAAC;YAC7E,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAE5B,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;IACH,CAAC;CACF"}
\ No newline at end of file
+{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../server/HttpError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAU,SAAQ,KAAK;IAIlC,YAAa,UAAkB,EAAE,OAAgB,EAAE,IAA8B,EAAE,OAAsB;QACvG,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAEvB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QAC1C,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;QAEjC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,CAAC,EAAE,CAAC;YAC7E,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAE5B,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;IACH,CAAC;CACF"}
\ No newline at end of file
diff --git a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/server/HttpError.ts b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/server/HttpError.ts
index 6e0fc4c211..d05a2c841b 100644
--- a/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/server/HttpError.ts
+++ b/waspc/e2e-test/test-outputs/waspJob-golden/waspJob/.wasp/out/sdk/wasp/server/HttpError.ts
@@ -2,8 +2,8 @@ export class HttpError extends Error {
   public statusCode: number
   public data: unknown
 
-  constructor (statusCode: number, message?: string, data?: Record<string, unknown>, ...params: any[]) {
-    super(message, ...params)
+  constructor (statusCode: number, message?: string, data?: Record<string, unknown>, options?: ErrorOptions) {
+    super(message, options)
 
     if (Error.captureStackTrace) {
       Error.captureStackTrace(this, HttpError)
diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums
index 0824c36f8e..b78559dfcc 100644
--- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums
+++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/.waspchecksums
@@ -214,7 +214,7 @@
             "file",
             "../out/sdk/wasp/server/HttpError.ts"
         ],
-        "5db03b580bebb72a8fbe9ff3b4f7abdf01e9d0eee4a3feabba20983d5c5c56b4"
+        "f375fb45eeb16381b8cc575503db302c005ddaa1b35d837ca0ea043fe8ec6ccb"
     ],
     [
         [
diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts
index b007210cfe..e40cd74ab7 100644
--- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts
+++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/dist/server/HttpError.d.ts
@@ -1,5 +1,5 @@
 export declare class HttpError extends Error {
     statusCode: number;
     data: unknown;
-    constructor(statusCode: number, message?: string, data?: Record<string, unknown>, ...params: any[]);
+    constructor(statusCode: number, message?: string, data?: Record<string, unknown>, options?: ErrorOptions);
 }
diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/dist/server/HttpError.js b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/dist/server/HttpError.js
index 3e216e57ce..6e91977adc 100644
--- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/dist/server/HttpError.js
+++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/dist/server/HttpError.js
@@ -1,6 +1,6 @@
 export class HttpError extends Error {
-    constructor(statusCode, message, data, ...params) {
-        super(message, ...params);
+    constructor(statusCode, message, data, options) {
+        super(message, options);
         if (Error.captureStackTrace) {
             Error.captureStackTrace(this, HttpError);
         }
diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/dist/server/HttpError.js.map b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/dist/server/HttpError.js.map
index 027628d881..8163354e1b 100644
--- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/dist/server/HttpError.js.map
+++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/dist/server/HttpError.js.map
@@ -1 +1 @@
-{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../server/HttpError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAU,SAAQ,KAAK;IAIlC,YAAa,UAAkB,EAAE,OAAgB,EAAE,IAA8B,EAAE,GAAG,MAAa;QACjG,KAAK,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAA;QAEzB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QAC1C,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;QAEjC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,CAAC,EAAE,CAAC;YAC7E,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAE5B,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;IACH,CAAC;CACF"}
\ No newline at end of file
+{"version":3,"file":"HttpError.js","sourceRoot":"","sources":["../../server/HttpError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,SAAU,SAAQ,KAAK;IAIlC,YAAa,UAAkB,EAAE,OAAgB,EAAE,IAA8B,EAAE,OAAsB;QACvG,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAEvB,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QAC1C,CAAC;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;QAEjC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,GAAG,IAAI,UAAU,GAAG,GAAG,CAAC,EAAE,CAAC;YAC7E,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;QACtE,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAE5B,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAClB,CAAC;IACH,CAAC;CACF"}
\ No newline at end of file
diff --git a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/server/HttpError.ts b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/server/HttpError.ts
index 6e0fc4c211..d05a2c841b 100644
--- a/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/server/HttpError.ts
+++ b/waspc/e2e-test/test-outputs/waspMigrate-golden/waspMigrate/.wasp/out/sdk/wasp/server/HttpError.ts
@@ -2,8 +2,8 @@ export class HttpError extends Error {
   public statusCode: number
   public data: unknown
 
-  constructor (statusCode: number, message?: string, data?: Record<string, unknown>, ...params: any[]) {
-    super(message, ...params)
+  constructor (statusCode: number, message?: string, data?: Record<string, unknown>, options?: ErrorOptions) {
+    super(message, options)
 
     if (Error.captureStackTrace) {
       Error.captureStackTrace(this, HttpError)