mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-05-01 09:26:38 +00:00
chore(errors): always add internal error to echo error
This commit is contained in:
@@ -51,12 +51,12 @@ func checkExportRequest(c echo.Context) (s *xorm.Session, u *user.User, err erro
|
||||
|
||||
var pass UserPasswordConfirmation
|
||||
if err := c.Bind(&pass); err != nil {
|
||||
return nil, nil, echo.NewHTTPError(http.StatusBadRequest, "No password provided.")
|
||||
return nil, nil, echo.NewHTTPError(http.StatusBadRequest, "No password provided.").SetInternal(err)
|
||||
}
|
||||
|
||||
err = c.Validate(pass)
|
||||
if err != nil {
|
||||
return nil, nil, echo.NewHTTPError(http.StatusBadRequest, err)
|
||||
return nil, nil, echo.NewHTTPError(http.StatusBadRequest, err).SetInternal(err)
|
||||
}
|
||||
|
||||
err = user.CheckUserPassword(u, pass.Password)
|
||||
|
||||
Reference in New Issue
Block a user