Example: auth middleware. For certain reasons, we might return 401. However, only thing we see in terminal is that 401 was returned. Not that it came from auth middleware, or why it happened. Why should both say where it happened (in auth middleware) and what caused it (for example, there was no such user in the database). This will make debugging much easier!
We should do this for all the functions that we generate, and also enable Waspers to use such mechanism in their code.
Example: auth middleware. For certain reasons, we might return 401. However, only thing we see in terminal is that 401 was returned. Not that it came from auth middleware, or why it happened. Why should both say where it happened (in auth middleware) and what caused it (for example, there was no such user in the database). This will make debugging much easier!
We should do this for all the functions that we generate, and also enable Waspers to use such mechanism in their code.