diff options
author | girlbossceo <june@girlboss.ceo> | 2023-07-28 23:40:10 +0000 |
---|---|---|
committer | girlbossceo <june@girlboss.ceo> | 2023-07-29 14:29:26 +0000 |
commit | cc5dcceacc38483209502d120b56407db9ad3055 (patch) | |
tree | 4c6fe63889cfc4de892ba961119c4e85c26b3670 /src/api/server_server.rs | |
parent | 863103450c876711e1d2dfead103f2bfa358a2aa (diff) | |
download | conduit-cc5dcceacc38483209502d120b56407db9ad3055.zip |
Log the room ID, event ID, PDU, and event type where possible
Signed-off-by: girlbossceo <june@girlboss.ceo>
Diffstat (limited to 'src/api/server_server.rs')
-rw-r--r-- | src/api/server_server.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/api/server_server.rs b/src/api/server_server.rs index 9a1b680..95716e7 100644 --- a/src/api/server_server.rs +++ b/src/api/server_server.rs @@ -711,7 +711,8 @@ pub async fn send_transaction_message_route( let (event_id, value, room_id) = match r { Ok(t) => t, Err(e) => { - warn!("Could not parse pdu: {e}"); + warn!("Could not parse PDU: {e}"); + warn!("Full PDU: {:?}", &pdu); continue; } }; @@ -952,7 +953,9 @@ pub async fn get_event_route( .rooms .timeline .get_pdu_json(&body.event_id)? - .ok_or(Error::BadRequest(ErrorKind::NotFound, "Event not found."))?; + .ok_or({ + warn!("Event not found, event ID: {:?}", &body.event_id); + Error::BadRequest(ErrorKind::NotFound, "Event not found.")})?; let room_id_str = event .get("room_id") @@ -1192,7 +1195,9 @@ pub async fn get_event_authorization_route( .rooms .timeline .get_pdu_json(&body.event_id)? - .ok_or(Error::BadRequest(ErrorKind::NotFound, "Event not found."))?; + .ok_or({ + warn!("Event not found, event ID: {:?}", &body.event_id); + Error::BadRequest(ErrorKind::NotFound, "Event not found.")})?; let room_id_str = event .get("room_id") |