middleware.py exception