From 60623cd14bfe7a868520ab991b90ce8e2b2134de Mon Sep 17 00:00:00 2001 From: strawberry Date: Fri, 29 Mar 2024 21:24:09 -0400 Subject: [PATCH] dont return bad_config for private room directory requests this would log as an error and as HTTP 500 Signed-off-by: strawberry --- src/api/server_server.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/server_server.rs b/src/api/server_server.rs index 84325a66..88d2f786 100644 --- a/src/api/server_server.rs +++ b/src/api/server_server.rs @@ -708,7 +708,7 @@ pub async fn get_public_rooms_filtered_route( .globals .allow_public_room_directory_over_federation() { - return Err(Error::bad_config("Room directory is not public.")); + return Err(Error::BadRequest(ErrorKind::Forbidden, "Room directory is not public")); } let response = client_server::get_public_rooms_filtered_helper( @@ -738,7 +738,7 @@ pub async fn get_public_rooms_route( .globals .allow_public_room_directory_over_federation() { - return Err(Error::bad_config("Room directory is not public.")); + return Err(Error::BadRequest(ErrorKind::Forbidden, "Room directory is not public")); } let response = client_server::get_public_rooms_filtered_helper(