We will need to refactor this so that the future's `setException` is called with the security exception.