Better error handling in admin panel