mirror of
https://github.com/Twigpine/node.git
synced 2026-11-08 07:38:18 -10:00
fix(node): log malformed receive-pack as warn, not error (#165)
git_receive_pack's error classifier routed every non-Timeout error, including client-caused BadRequest (400), through tracing::error!. Mirror the git_upload_pack arm so a malformed push logs at warn level instead of as a server error.
This commit is contained in:
1 parent
e72f4609a4
commit
41eca0bbed
1 file changed
+3
@@ -936,6 +936,9 @@ pub async fn git_receive_pack(
|
||||
let app = git_service_app_error(&e);
|
||||
match &app {
|
||||
AppError::Timeout(_) => tracing::warn!(repo = %name, "git receive-pack timed out"),
|
||||
AppError::BadRequest(msg) => {
|
||||
tracing::warn!(repo = %name, err = %msg, "git receive-pack: bad client request")
|
||||
}
|
||||
_ => tracing::error!(repo = %name, err = %e, "git receive-pack failed"),
|
||||
}
|
||||
app
|
||||
|
||||
Reference in new issue
Block a user