Skip to content
Snippets Groups Projects
Commit de26bf22 authored by 🥺's avatar 🥺 :transgender_flag: Committed by 🥺
Browse files

adjust a couple error codes for room alias getting

parent a7c14a86
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ pub(crate) async fn create_alias_route(body: Ruma<create_alias::v3::Request>) ->
.forbidden_alias_names()
.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()
......@@ -171,7 +171,7 @@ pub(crate) async fn get_alias_helper(
}
return Err(Error::BadRequest(
ErrorKind::Unknown,
ErrorKind::NotFound,
"No servers could assist in resolving the room alias",
));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment