Added error handling for book detail requests