Merge pull request #33665 from overleaf/copilot/fix-error-logging-in-git-bridge

git-bridge: Log WrongBranchException and ForcedPushException at WARN instead of ERROR
GitOrigin-RevId: 7aaa934a0df614e336ce3c20b892af1af0cd070f
This commit is contained in:
Eric Mc Sween
2026-05-18 08:06:29 +00:00
committed by Copybot
parent a3682af6e4
commit 2913e462ec
2 changed files with 131 additions and 0 deletions
@@ -70,6 +70,9 @@ public class WriteLatexPutHook implements PreReceiveHook {
} catch (OutOfDateException e) {
Log.error("OutOfDateException on pre receive", e);
receiveCommand.setResult(Result.REJECTED_NONFASTFORWARD);
} catch (WrongBranchException | ForcedPushException e) {
Log.warn("User push rejected on pre receive: {}", e.getMessage());
handleSnapshotPostException(receivePack, receiveCommand, e);
} catch (GitUserException e) {
Log.error("GitUserException on pre receive", e);
handleSnapshotPostException(receivePack, receiveCommand, e);