Merge error docs for existing and reserved users

This commit is contained in:
Kai A. Hiller
2026-08-06 19:22:50 +02:00
committed by V02460
parent 205d31d109
commit ecc3fc54a6
+1 -5
View File
@@ -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)
})
}