error checks in middleware/admin