improvement: log bad database errors automatically
This commit is contained in:
parent
2368a90584
commit
56d4742201
13 changed files with 278 additions and 208 deletions
|
@ -42,7 +42,10 @@ impl<'a, T: Endpoint> FromData<'a> for Ruma<T> {
|
|||
let data = rocket::try_outcome!(outcome.owned());
|
||||
|
||||
let (user_id, device_id) = if T::METADATA.requires_authentication {
|
||||
let db = request.guard::<State<'_, crate::Database>>().await.expect("database was loaded");
|
||||
let db = request
|
||||
.guard::<State<'_, crate::Database>>()
|
||||
.await
|
||||
.expect("database was loaded");
|
||||
|
||||
// Get token from header or query value
|
||||
let token = match request
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue