Thank you, someone already commented about this but as i said it's out of the article scope, so i will either edit the article or write another one for this particular issue. If you need a solution you can checkout my node-ts kit you'll fine out what you seek. Here it is: github.com/osclancer/node-ts Thanks again ♥️
Great article, but there is another problem raised. That is you can't overwrite the error message..
Like when user query with invalid email address than he get an uncaught exception that you can't overwrite if you using this method.
Salah Assi
Software Engineer
Well, congrats you got rid of try/catch but you got another issue which is you can't change either the error code or the error message. Basically, when you design a software to fullfil business needs, you need to be flexible, you should care about returning the right message and code more than using try/catch.
Thanks anyway 😅