return M_BAD_ALIAS when trying to set non-existent canonical aliases

This is the error code named in the spec.
This commit is contained in:
Olivia Lee 2025-01-20 12:04:14 -08:00
parent 8537c0e8ac
commit c748c7c188
No known key found for this signature in database
GPG key ID: 54D568A15B9CD1F9
2 changed files with 6 additions and 1 deletions

View file

@ -232,7 +232,7 @@ async fn send_state_event_for_key_helper(
.is_none()
{
return Err(Error::BadRequest(
ErrorKind::forbidden(),
ErrorKind::BadAlias,
"You are only allowed to send canonical_alias events when \
it's aliases already exists",
));