mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-11-17 13:50:49 +01:00
More logging
This commit is contained in:
parent
1679da7784
commit
6d27f15516
1 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,7 @@ mod ruma_wrapper;
|
|||
|
||||
use {
|
||||
directories::ProjectDirs,
|
||||
log::debug,
|
||||
rocket::{get, post, put, routes, State},
|
||||
ruma_client_api::{
|
||||
error::{Error, ErrorKind},
|
||||
|
@ -40,16 +41,18 @@ fn register_route(
|
|||
.try_into()
|
||||
{
|
||||
Err(_) => {
|
||||
debug!("Username invalid");
|
||||
return MatrixResult(Err(Error {
|
||||
kind: ErrorKind::InvalidUsername,
|
||||
message: "Username was invalid.".to_owned(),
|
||||
status_code: http::StatusCode::BAD_REQUEST,
|
||||
}))
|
||||
}));
|
||||
}
|
||||
Ok(user_id) => user_id,
|
||||
};
|
||||
|
||||
if users.contains_key(user_id.to_string()).unwrap() {
|
||||
debug!("ID already taken");
|
||||
return MatrixResult(Err(Error {
|
||||
kind: ErrorKind::UserInUse,
|
||||
message: "Desired user ID is already taken.".to_owned(),
|
||||
|
|
Loading…
Reference in a new issue