Improve error messages for missing auth event and invalid join validations.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-08-31 10:17:54 +00:00
parent 804257eb52
commit eec6e45358
4 changed files with 13 additions and 9 deletions

View File

@@ -9,7 +9,7 @@ type Parsed = (OwnedRoomId, OwnedEventId, CanonicalJsonObject);
#[implement(super::Service)]
pub async fn parse_incoming_pdu(&self, pdu: &RawJsonValue) -> Result<Parsed> {
let value = serde_json::from_str::<CanonicalJsonObject>(pdu.get()).map_err(|e| {
err!(BadServerResponse(debug_warn!("Error parsing incoming event {e:?}")))
err!(BadServerResponse(debug_error!("Error parsing incoming event: {e} {pdu:#?}")))
})?;
let room_id: OwnedRoomId = value