def validate_request(self) -> Response | None:
        """Hook to run some validations before processing a request"""

        # prevent architecture bugs
        assert (
            "POST" == self.request.method
        ), "Only POST requests can be used to initiate a background process"
Hook to run some validations before processing a request
cvat/apps/redis_handler/background.py