Skip to content

Commit

Permalink
Log exception stack for debugging in ExceptionFilter (#3146)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyomair authored Jan 16, 2025
1 parent 9546356 commit 535afe0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api/cms-api/src/common/errors/exception.filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class ExceptionFilter implements NestExceptionFilter {
} else {
returnedError = this.debug ? exception : new InternalServerErrorException();
statusCode = "getStatus" in returnedError && typeof returnedError.getStatus === "function" ? returnedError.getStatus() : 500;
this.logger.error(exception); // Log for debugging
this.logger.error(exception, exception.stack); // Log for debugging
}

const ctxType = host.getType<"http" | "graphql">(); // Check if it's an HTTP or GraphQL request
Expand Down

0 comments on commit 535afe0

Please sign in to comment.