Description of changes:
Removed redundant exception handling in the service classes so that nestjs captures exceptions as it should. The expected behavior is to respond with 500 HttpStatusCode and log the error to the console, we can rely on the built-in global exception filter as described here: https://docs.nestjs.com/exception-filters
"Out of the box, this action is performed by a built-in global exception filter, which handles exceptions of type HttpException (and subclasses of it). When an exception is unrecognized (is neither HttpException nor a class that inherits from HttpException), the built-in exception filter generates the following default JSON response:
{
"statusCode": 500,
"message": "Internal server error"
}"
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available:
Description of changes: Removed redundant exception handling in the service classes so that nestjs captures exceptions as it should. The expected behavior is to respond with 500 HttpStatusCode and log the error to the console, we can rely on the built-in global exception filter as described here: https://docs.nestjs.com/exception-filters "Out of the box, this action is performed by a built-in global exception filter, which handles exceptions of type HttpException (and subclasses of it). When an exception is unrecognized (is neither HttpException nor a class that inherits from HttpException), the built-in exception filter generates the following default JSON response: { "statusCode": 500, "message": "Internal server error" }"
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.