diff --git a/packages/common/exceptions/http.exception.ts b/packages/common/exceptions/http.exception.ts index 2ad89afc6f6..2192c5f3617 100644 --- a/packages/common/exceptions/http.exception.ts +++ b/packages/common/exceptions/http.exception.ts @@ -5,7 +5,8 @@ import { import { isObject, isString } from '../utils/shared.utils'; export interface HttpExceptionOptions { - cause?: Error; + /** original cause of the error */ + cause?: unknown; description?: string; } @@ -68,14 +69,13 @@ export class HttpException extends Error { this.initCause(); } - public cause: Error | undefined; + public cause: unknown; /** * Configures error chaining support * - * See: - * - https://nodejs.org/en/blog/release/v16.9.0/#error-cause - * - https://github.com/microsoft/TypeScript/issues/45167 + * @see https://nodejs.org/en/blog/release/v16.9.0/#error-cause + * @see https://github.com/microsoft/TypeScript/issues/45167 */ public initCause(): void { if (this.options?.cause) {