Add trace log for payloads

Signed-off-by: pep <pep@bouah.net>
This commit is contained in:
pep 2024-09-04 22:49:34 +02:00
parent 6e7462f54d
commit 468b42abfd

View file

@ -65,6 +65,7 @@ async fn hooks_inner(req: Request<Incoming>, secret: &str) -> Result<Hook, Error
return Err(Error::InvalidSecret);
}
trace!("Payload: {:?}", std::str::from_utf8(&payload));
let hook: GitlabHook = serde_json::from_slice(&payload[..])?;
debug!("Found Gitlab payload");
return Ok(Hook::try_from(hook)?);
@ -84,6 +85,7 @@ async fn hooks_inner(req: Request<Incoming>, secret: &str) -> Result<Hook, Error
return Err(Error::InvalidSignature);
}
trace!("Payload: {:?}", std::str::from_utf8(&payload));
let hook: ForgejoHook = serde_json::from_slice(&payload[..])?;
debug!("Found Forgejo payload.");
return Ok(Hook::try_from(hook)?);