In an async task (e.g. in a promise), you need to use next(error) - throw error will NOT cause the error handling middleware to become active.
In an async task (e.g. in a promise), you need to use next(error) - throw error will NOT cause the error handling middleware to become active.