split request base result handling and tweak logging
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
aef77bd338
commit
e90ab8ec8e
2 changed files with 58 additions and 38 deletions
|
@ -8,7 +8,6 @@ use axum::{
|
|||
};
|
||||
use http::{Method, Uri};
|
||||
use ruma::api::{client::error::ErrorKind, IncomingRequest};
|
||||
use tracing::{info, warn};
|
||||
|
||||
use crate::{
|
||||
api::{client_server, server_server},
|
||||
|
@ -231,13 +230,7 @@ pub(crate) fn routes(config: &Config) -> Router {
|
|||
}
|
||||
}
|
||||
|
||||
async fn not_found(uri: Uri) -> impl IntoResponse {
|
||||
if uri.path().contains("_matrix/") {
|
||||
warn!("Not found: {uri}");
|
||||
} else {
|
||||
info!("Not found: {uri}");
|
||||
}
|
||||
|
||||
async fn not_found(_uri: Uri) -> impl IntoResponse {
|
||||
Error::BadRequest(ErrorKind::Unrecognized, "Unrecognized request")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue