aws-samples / aws-saas-factory-eks-saas-workshop

MIT No Attribution
56 stars 23 forks source link

removed redundant catch blocks #19

Closed somensi-aws closed 2 years ago

somensi-aws commented 2 years ago

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.

tobuck-aws commented 2 years ago

Thanks!