             .generateLinkAccountSessionManifest(clientSecret: self.linkAccountSessionClientSecret)
             .observe { [weak self] result in
                 guard let self = self else { return }
-                self.activityIndicatorView.stp_stopAnimatingAndHide()
-
                 switch result {
                 case .success(let manifest):
                     self.startAuthenticationSession(manifest: manifest)
                 case .failure(let error):
+                    self.activityIndicatorView.stp_stopAnimatingAndHide()
                     self.errorView.isHidden = false
                     // TODO(vardges): Is it ok to propogate message here?
                     self.result = .failed(error: ConnectionsSheetError.unknown(debugDescription: error.localizedDescription))

                case .success(let accounts):
                    self.result = .completed(linkedAccounts: accounts)
                case .failure(let error):
                    self.result = .failed(error: error)
                }
                self.dismiss(animated: true, completion: nil)
            }
    }

fileprivate extension ConnectionsHostViewController {
    enum Styling {
        static let errorViewInsets = UIEdgeInsets(top: 32, left: 16, bottom: 0, right: 16)
        static let errorViewSpacing: CGFloat = 8
        static var errorLabelFont: UIFont {
            UIFont.preferredFont(forTextStyle: .body, weight: .medium)
        }
