dont return bad_config for private room directory requests

this would log as an error and as HTTP 500

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-03-29 21:24:09 -04:00 committed by June
parent b39aa00a9b
commit 60623cd14b
1 changed files with 2 additions and 2 deletions

View File

@ -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(