summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorTimo Kösters <timo@koesters.xyz>2022-10-08 13:57:01 +0200
committerNyaaori <+@nyaaori.cat>2022-10-10 14:02:02 +0200
commit8b5b7a1f637322e651c84d11a7b1616c7e29952e (patch)
tree67b37f970255518f8b494e17bc0eddbfa0a6cb9d /src/api
parent50b0eb9929104a1eed008cbf0a8965a802c20306 (diff)
downloadconduit-8b5b7a1f637322e651c84d11a7b1616c7e29952e.zip
fix: panic on launch
Now we start the admin and sending threads at a later time.
Diffstat (limited to 'src/api')
-rw-r--r--src/api/client_server/directory.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/api/client_server/directory.rs b/src/api/client_server/directory.rs
index c1b0eda..90f79a0 100644
--- a/src/api/client_server/directory.rs
+++ b/src/api/client_server/directory.rs
@@ -29,7 +29,7 @@ use ruma::{
},
ServerName, UInt,
};
-use tracing::{info, warn};
+use tracing::{error, info, warn};
/// # `POST /_matrix/client/r0/publicRooms`
///
@@ -279,15 +279,14 @@ pub(crate) async fn get_public_rooms_filtered_helper(
JoinRule::Knock => Some(PublicRoomJoinRule::Knock),
_ => None,
})
- .map_err(|_| {
- Error::bad_database("Invalid room join rule event in database.")
+ .map_err(|e| {
+ error!("Invalid room join rule event in database: {}", e);
+ Error::BadDatabase("Invalid room join rule event in database.")
})
})
.transpose()?
.flatten()
- .ok_or(Error::bad_database(
- "Invalid room join rule event in database.",
- ))?,
+ .ok_or_else(|| Error::bad_database("Missing room join rule event for room."))?,
room_id,
};
Ok(chunk)