瀏覽代碼

Update api/server/handlers/gitinstallation/get_branch_metadata.go

Co-authored-by: Mohammed Nafees <hello@mnafees.me>
meehawk 3 年之前
父節點
當前提交
620c7acb0d
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      api/server/handlers/gitinstallation/get_branch_metadata.go

+ 2 - 1
api/server/handlers/gitinstallation/get_branch_metadata.go

@@ -61,7 +61,8 @@ func (c *GithubGetBranchMetadataHandler) ServeHTTP(w http.ResponseWriter, r *htt
 		c.HandleAPIError(
 		c.HandleAPIError(
 			w,
 			w,
 			r,
 			r,
-			apierrors.NewErrPassThroughToClient(fmt.Errorf("Error getting branch %s for repository %s/%s. Error: %w", branch, owner, name, err), http.StatusConflict),
+			apierrors.NewErrPassThroughToClient(fmt.Errorf("Error communicating with the GitHub API. Please try again."),
+				http.StatusConflict, fmt.Sprintf("Error getting branch %s for repository %s/%s: %v", branch, owner, name, err))
 		)
 		)
 		return
 		return
 	}
 	}