Added error handler in handlers.py