From ef61b495750629739b1150d10efdef65b07eb353 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Tue, 15 Oct 2019 15:01:01 -0700 Subject: [PATCH] A nice error --- command/pr.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/command/pr.go b/command/pr.go index c7e5449ef..b6b6586ec 100644 --- a/command/pr.go +++ b/command/pr.go @@ -90,7 +90,8 @@ func prView(cmd *cobra.Command, args []string) error { } else { prPayload, err := api.PullRequests() if err != nil { - return err + branch := currentBranch() + return fmt.Errorf("The [%s] branch has no open PRs", branch) } openURL = prPayload.CurrentPR.URL }