Handle IO exceptions like 404 errors