Open joseaburt opened 3 months ago
@joseaburt looking at the example it is an async/await issue - findOne
is async so you should use await in line 19 of your controller - this will allow you to catch an error thrown from the service. Current code just returns rejected promise which is resolved by express, after returning from controller so outside of try block.
Description
As the image shows the client is getting the exact domain service error and the controller normal try/catch does not have any effect. Something like Reflection stuff behind can be causing this.