private static MobileConnectStatus GenerateStatusFromDiscoveryResponse(IDiscovery discovery, DiscoveryResponse response) { if (!response.Cached && response.ErrorResponse != null) { return(MobileConnectStatus.Error(response.ResponseData?.error, response.ResponseData?.description ?? "Failure at discovery endpoint, see response for more information", null, response)); } var operatorSelectionUrl = discovery.ExtractOperatorSelectionURL(response); if (!string.IsNullOrEmpty(operatorSelectionUrl)) { return(MobileConnectStatus.OperatorSelection(operatorSelectionUrl)); } return(MobileConnectStatus.StartAuthorization(response)); }