try/except with error logging for page order_by function