mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-04-27 23:55:25 +00:00
chore(errors): always add internal error to echo error
This commit is contained in:
@@ -50,13 +50,13 @@ func UserChangePassword(c echo.Context) error {
|
||||
// Check if the user is itself
|
||||
doer, err := user.GetCurrentUser(c)
|
||||
if err != nil {
|
||||
return echo.NewHTTPError(http.StatusInternalServerError, "Error getting current user.")
|
||||
return echo.NewHTTPError(http.StatusInternalServerError, "Error getting current user.").SetInternal(err)
|
||||
}
|
||||
|
||||
// Check for Request Content
|
||||
var newPW UserPassword
|
||||
if err := c.Bind(&newPW); err != nil {
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "No password provided.")
|
||||
return echo.NewHTTPError(http.StatusBadRequest, "No password provided.").SetInternal(err)
|
||||
}
|
||||
|
||||
if newPW.OldPassword == "" {
|
||||
|
||||
Reference in New Issue
Block a user