fix: improve auth error messages and unify username validation length

This commit is contained in:
AndyYang
2026-03-15 11:09:20 +08:00
committed by lyingbug
parent 0fe5d67b6a
commit 0e8f1b1c81
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ func (h *AuthHandler) Register(c *gin.Context) {
user, err := h.userService.Register(ctx, &req)
if err != nil {
logger.Errorf(ctx, "Failed to register user: %v", err)
appErr := errors.NewBadRequestError("Registration failed").WithDetails(err.Error())
appErr := errors.NewBadRequestError(err.Error())
c.Error(appErr)
return
}