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:
parent
b39aa00a9b
commit
60623cd14b
1 changed files with 2 additions and 2 deletions
|
@ -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(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue