error handling

This commit is contained in:
Alex
2025-02-28 10:46:40 +01:00
parent b0271f8443
commit a2e8abbf6b
6 changed files with 59 additions and 38 deletions

View File

@@ -342,8 +342,7 @@ func (uc *UserController) VerifyMailHandler(c *gin.Context) {
verification, err := uc.Service.VerifyUser(&token, &constants.VerificationTypes.Email)
if err != nil {
logger.Error.Printf("Cannot verify user: %v", err)
c.HTML(http.StatusUnauthorized, "verification_error.html", gin.H{"ErrorMessage": "Emailadresse wurde schon bestätigt. Sollte dies nicht der Fall sein, wende Dich bitte an info@carsharing-hasloh.de."})
utils.HandleVerifyUserError(c, err)
return
}