Instead, I would just raise early. I.e.
```python
if not self.failure_url:
    raise ImproperlyConfigured(
        "No URL to redirect to. Provide a 'failure_url'"
    )
return self.failure_url
```