mirror of
https://github.com/go-gitea/gitea
synced 2024-11-05 01:34:25 +00:00
* In File Create/Update API return 404 if Branch does not exist (#11791) * v1.12 version ;)
This commit is contained in:
parent
99f7ec8f45
commit
20951c5c21
@ -350,6 +350,10 @@ func handleCreateOrUpdateFileError(ctx *context.APIContext, err error) {
|
|||||||
ctx.Error(http.StatusUnprocessableEntity, "Invalid", err)
|
ctx.Error(http.StatusUnprocessableEntity, "Invalid", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if git.IsErrBranchNotExist(err) {
|
||||||
|
ctx.Error(http.StatusNotFound, "BranchDoesNotExist", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
ctx.Error(http.StatusInternalServerError, "UpdateFile", err)
|
ctx.Error(http.StatusInternalServerError, "UpdateFile", err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user