Cleanup removing debug printing and logging, append non state events

This commit is contained in:
Devin Ragotzy 2020-12-04 17:16:29 -05:00 committed by Timo Kösters
parent c173ce43a5
commit b869aab5d0
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
6 changed files with 119 additions and 130 deletions

View file

@ -256,7 +256,12 @@ pub async fn get_backup_key_session_route(
let key_data = db
.key_backups
.get_session(&sender_user, &body.version, &body.room_id, &body.session_id)?
.ok_or_else(|| Error::bad_database("Backup key not found for this user's session."))?;
.ok_or_else(|| {
Error::BadRequest(
ErrorKind::NotFound,
"Backup key not found for this user's session.",
)
})?;
Ok(get_backup_key_session::Response { key_data }.into())
}