Added Express error handling logic.