Added exception handling to route helper