Skip to content

Commit

Permalink
Merge pull request #11673 from namoscato/fix-11665-error-cause-type
Browse files Browse the repository at this point in the history
fix(common): loosen http exception cause type
  • Loading branch information
kamilmysliwiec authored Jun 12, 2023
2 parents 404e2c7 + 41552d3 commit efa9909
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/common/exceptions/http.exception.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit efa9909

Please sign in to comment.