We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30d77cd commit 9b148f2Copy full SHA for 9b148f2
routers/web/repo/pull.go
@@ -1585,7 +1585,13 @@ func UpdatePullRequestTarget(ctx *context.Context) {
1585
if err := pull_service.ChangeTargetBranch(ctx, pr, ctx.Doer, targetBranch); err != nil {
1586
switch {
1587
case git_model.IsErrBranchNotExist(err):
1588
- ctx.HTTPError(http.StatusBadRequest)
+ errorMessage := ctx.Tr("form.target_branch_not_exist")
1589
+
1590
+ ctx.Flash.Error(errorMessage)
1591
+ ctx.JSON(http.StatusBadRequest, map[string]any{
1592
+ "error": err.Error(),
1593
+ "user_error": errorMessage,
1594
+ })
1595
case issues_model.IsErrPullRequestAlreadyExists(err):
1596
err := err.(issues_model.ErrPullRequestAlreadyExists)
1597
0 commit comments