proper error message when trying to log as an user that doesn't exist
This commit is contained in:
parent
af0c7dea0f
commit
81c52860e6
1 changed files with 1 additions and 0 deletions
|
|
@ -36,6 +36,7 @@ let login ~nick ~password request =
|
|||
Ok ()
|
||||
else
|
||||
Error "wrong password"
|
||||
| Ok [] -> Error (Format.sprintf "user `%s` doesn't exist" nick)
|
||||
| Ok _ -> Error "incoherent db answer"
|
||||
| Error e -> Error (Format.sprintf "db error: %s" (Rc.to_string e))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue