http.Handle("/login/", rootHandler(loginHandler)) log.Fatal(http.ListenAndServe(":8080", nil)) } What happens when we make POST request to /login/ endpoint with invalid username and password?
var schema loginSchema if err = json.Unmarshal(body, &schema); err!= nil { return NewHTTPError(err, 400, "Bad request : invalid JSON.")