catch an error in router file and add comments