add error handling
fix test for updated data route