Closed ianzone closed 1 year ago
@ianzone Since the model instance is directly return from dynamoose, it cannot be done easily.
add try catch example for 404 not found https://github.com/hardyscc/aws-nestjs-starter/commit/935b4d126e665d60580d680c36df19ae0069e52e
I'm submitting a...
Current behavior
if a resource is not found, the get method only returns an empty object. it requires further check to throw the 404 error.
Expected behavior
throw the built-in NotFoundException when the resource is not found. so the above code can be written as
What is the motivation / use case for changing the behavior?
throw 404 when a resource is not found is a standard RESTful API behavior.
Environment