mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-09-16 14:02:38 +00:00
Merge error docs for existing and reserved users
This commit is contained in:
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user