Fix error path in page apis