Просмотр исходного кода

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

Co-authored-by: Mohammed Nafees <hello@mnafees.me>
meehawk 3 лет назад
Родитель
Сommit
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(
 			w,
 			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
 	}