public static IObservable <RecoveryOptionResult> ShowUserErrorThatRequiresNavigatingToBilling( this Exception exception, IAccount account) { var errorType = (exception is PrivateRepositoryQuotaExceededException && account.IsOnFreePlan) ? ErrorType.RepoCreationAsPrivateNotAvailableForFreePlan : ErrorType.RepoCreationOnGitHubFailed; return(exception.DisplayErrorMessage( errorType, new object[] { }, new[] { OpenBrowser("View Plans", account.Billing()), Cancel })); }
public static IObservable<RecoveryOptionResult> ShowUserErrorThatRequiresNavigatingToBilling( this Exception exception, IAccount account) { var errorType = (exception is PrivateRepositoryQuotaExceededException && account.IsOnFreePlan) ? ErrorType.RepoCreationAsPrivateNotAvailableForFreePlan : ErrorType.RepoCreationOnGitHubFailed; return exception.DisplayErrorMessage( errorType, new object[] { }, new[] { OpenBrowser("View Plans", account.Billing()), Cancel }); }