500 server error when trying to update a PR that contains conflicts with rebase #7789

Closed
opened 2025-11-02 07:36:33 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @qwerty287 on GitHub (Sep 2, 2021).

  • Gitea version (or commit ref):1.16.0+dev-192-g268b2d0c9
  • Git version:2.30.2
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes
    • No
  • Logs:
.../api/v1/repo/pull.go:1140:UpdatePullRequest() [E] pull_service.Update: Rebase Error: exit status 1: Whilst Rebasing: <commit hash>
        Rebasing (1/1)\01503derror: could not apply <commit hash>... change README.md
        Resolve all conflicts manually, mark them as resolved with
        "git add/rm <conflicted_files>", then run "git rebase --continue".
        You can instead skip this commit: run "git rebase --skip".
        To abort and get back to the state before "git rebase", run "git rebase --abort".
        Could not apply 5a5fa47... change README.md

        Auto-merging README.md
        CONFLICT (content): Merge conflict in README.md
Completed POST /api/v1/repos/qwerty287/tests/pulls/1/update?style=rebase 500 Internal Server Error in 258.618144ms

Description

If I try to update a PR with conflicts via rebase (using the API), I get a 500 error. If I use the default merge option, I get a 409 Conflict error, which is better. It would be nice if it could return a 409 error if the PR contains conflicts.

Originally created by @qwerty287 on GitHub (Sep 2, 2021). - Gitea version (or commit ref):1.16.0+dev-192-g268b2d0c9 - Git version:2.30.2 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes - [ ] No - Logs: ``` .../api/v1/repo/pull.go:1140:UpdatePullRequest() [E] pull_service.Update: Rebase Error: exit status 1: Whilst Rebasing: <commit hash> Rebasing (1/1)\01503derror: could not apply <commit hash>... change README.md Resolve all conflicts manually, mark them as resolved with "git add/rm <conflicted_files>", then run "git rebase --continue". You can instead skip this commit: run "git rebase --skip". To abort and get back to the state before "git rebase", run "git rebase --abort". Could not apply 5a5fa47... change README.md Auto-merging README.md CONFLICT (content): Merge conflict in README.md Completed POST /api/v1/repos/qwerty287/tests/pulls/1/update?style=rebase 500 Internal Server Error in 258.618144ms ``` ## Description If I try to update a PR with conflicts via `rebase` (using the API), I get a 500 error. If I use the default merge option, I get a 409 Conflict error, which is better. It would be nice if it could return a 409 error if the PR contains conflicts.
GiteaMirror added the type/bug label 2025-11-02 07:36:33 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7789