login-validator: precise login error
This commit is contained in:
parent
046abdd93c
commit
af630e7b84
@ -106,11 +106,11 @@ func (l loginChecker) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
// Register the user remotely
|
// Register the user remotely
|
||||||
if ip, err := l.registerUser(lu.Username, r.RemoteAddr, *mac); err != nil {
|
if ip, err := l.registerUser(lu.Username, r.RemoteAddr, *mac); err != nil {
|
||||||
log.Println("Error on remote registration:", err)
|
log.Println("Error on remote registration for", lu.Username, ":", err)
|
||||||
http.Error(w, "Internal server error. Please retry in a few minutes", http.StatusInternalServerError)
|
http.Error(w, "Internal server error. Please retry in a few minutes", http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
} else if err := l.lateLoginAction(lu.Username, r.RemoteAddr, *mac, ip); err != nil {
|
} else if err := l.lateLoginAction(lu.Username, r.RemoteAddr, *mac, ip); err != nil {
|
||||||
log.Println("Error on late login action:", err)
|
log.Println("Error on late login action for", lu.Username, ":", err)
|
||||||
http.Error(w, "Internal server error. Please retry in a few minutes", http.StatusInternalServerError)
|
http.Error(w, "Internal server error. Please retry in a few minutes", http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user