don't log nil error

This commit is contained in:
jkoberg
2021-10-27 14:53:10 +02:00
parent d627c5240e
commit f0f0c182ef
+1 -1
View File
@@ -181,7 +181,7 @@ func (o Ocs) AddUser(w http.ResponseWriter, r *http.Request) {
}
if strings.TrimSpace(password) == "" {
mustNotFail(render.Render(w, r, response.ErrRender(data.MetaBadRequest.StatusCode, "empty password not allowed")))
o.logger.Error().Err(err).Str("userid", userid).Msg("empty password not allowed")
o.logger.Error().Str("userid", userid).Msg("empty password not allowed")
return
}