Open hanadamaru opened 1 year ago
I wish render 500 error page when catch exception on my ExceptionFilter. but display just white page.
catch(exception: Error, host: ArgumentsHost) { const ctx = host.switchToHttp(); const response = ctx.getResponse(); const exceptionStatus = exception instanceof HttpException ? exception.getStatus() : HttpStatus.INTERNAL_SERVER_ERROR; const data = exceptionStatus >= HttpStatus.INTERNAL_SERVER_ERROR ? exception['stack'] : undefined; this.logger.error(Object.assign({ exceptionStatus: exceptionStatus, msg: exception['message'], stack: data })); response.view('errors/500.hbs', {title: '500 ERROR'}); }
Did you manage to solve this @hanadamaru?
I wish render 500 error page when catch exception on my ExceptionFilter. but display just white page.