Added error handling and test cases for pages and datasets.