diff --git a/crates/handlers/src/admin/v1/users/add.rs b/crates/handlers/src/admin/v1/users/add.rs index 976ae818f..48b357043 100644 --- a/crates/handlers/src/admin/v1/users/add.rs +++ b/crates/handlers/src/admin/v1/users/add.rs @@ -125,13 +125,9 @@ pub fn doc(operation: TransformOperation) -> TransformOperation { let response = ErrorResponse::from_error(&RouteError::UsernameNotValid); t.description("Username is not valid").example(response) }) - .response_with::<409, RouteError, _>(|t| { - let response = ErrorResponse::from_error(&RouteError::UserAlreadyExists); - t.description("User already exists").example(response) - }) .response_with::<409, RouteError, _>(|t| { let response = ErrorResponse::from_error(&RouteError::UsernameReserved); - t.description("Username is reserved by the homeserver") + t.description("User already exists or the username is reserved by the homeserver") .example(response) }) } diff --git a/docs/api/spec.json b/docs/api/spec.json index 72c4bf0e2..8f4cbbce4 100644 --- a/docs/api/spec.json +++ b/docs/api/spec.json @@ -2310,7 +2310,7 @@ } }, "409": { - "description": "Username is reserved by the homeserver", + "description": "User already exists or the username is reserved by the homeserver", "content": { "application/json": { "schema": {