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:
@@ -708,7 +708,7 @@ pub async fn get_public_rooms_filtered_route(
|
|||||||
.globals
|
.globals
|
||||||
.allow_public_room_directory_over_federation()
|
.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(
|
let response = client_server::get_public_rooms_filtered_helper(
|
||||||
@@ -738,7 +738,7 @@ pub async fn get_public_rooms_route(
|
|||||||
.globals
|
.globals
|
||||||
.allow_public_room_directory_over_federation()
|
.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(
|
let response = client_server::get_public_rooms_filtered_helper(
|
||||||
|
|||||||
Reference in New Issue
Block a user