Error handling shifted to Database
Bug fix