update routes based on error