[ENHANCEMENT] Error handling added to route templates