adjust a couple error codes for room alias getting
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
a7c14a861b
commit
de26bf22dc
1 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ pub(crate) async fn create_alias_route(body: Ruma<create_alias::v3::Request>) ->
|
||||||
.forbidden_alias_names()
|
.forbidden_alias_names()
|
||||||
.is_match(body.room_alias.alias())
|
.is_match(body.room_alias.alias())
|
||||||
{
|
{
|
||||||
return Err(Error::BadRequest(ErrorKind::Unknown, "Room alias is forbidden."));
|
return Err(Error::BadRequest(ErrorKind::forbidden(), "Room alias is forbidden."));
|
||||||
}
|
}
|
||||||
|
|
||||||
if services()
|
if services()
|
||||||
|
@ -171,7 +171,7 @@ pub(crate) async fn get_alias_helper(
|
||||||
}
|
}
|
||||||
|
|
||||||
return Err(Error::BadRequest(
|
return Err(Error::BadRequest(
|
||||||
ErrorKind::Unknown,
|
ErrorKind::NotFound,
|
||||||
"No servers could assist in resolving the room alias",
|
"No servers could assist in resolving the room alias",
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue