Improve error messages (#370)

fixes #367

Co-authored-by: Norwin Roosen <git@nroo.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/gitea/tea/pulls/370
Reviewed-by: 6543 <6543@obermui.de>
Reviewed-by: KN4CK3R <kn4ck3r@noreply.gitea.io>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
Norwin
2021-07-03 22:39:05 +08:00
committed by 6543
parent 64770a771f
commit 2bdd72dfff
2 changed files with 10 additions and 2 deletions

View File

@ -28,7 +28,7 @@ func PullCheckout(
client := login.Client()
pr, _, err := client.GetPullRequest(repoOwner, repoName, index)
if err != nil {
return err
return fmt.Errorf("couldn't fetch PR: %s", err)
}
if err := workaround.FixPullHeadSha(client, pr); err != nil {
return err