Closed Dominic-Preap closed 6 years ago
On version 4.6.5 updates say:
HttpException
Error
RpcException
WsException
In your code base by checking instanceof Error will make every exception to status 500
instanceof
if (err instanceof Error) { console.error(errTitle, err); const statusCode = HttpStatus.INTERNAL_SERVER_ERROR; res.status(statusCode).json({ statusCode, message: 'Internal Server Error' }); }
fixed
On version 4.6.5 updates say:
HttpException
extendsError
RpcException
extendsError
WsException
extendsError
In your code base by checking
instanceof
Error will make every exception to status 500