Fix error reponses

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-01-21 10:01:13 +08:00
parent b7e6009706
commit 4ac5b1c101
7 changed files with 28 additions and 24 deletions

View File

@@ -228,13 +228,13 @@ func (self *Attendance) VerifyCheckinCode(checkinCode string) error {
val, err := Redis.Get(ctx, "checkin_code:"+checkinCode).Result()
if err != nil {
return errors.New("invalid or expired checkin code")
return errors.New("[Attendance Data] invalid or expired checkin code")
}
// Expected format: user_id:<uuid>:event_id:<uuid>
parts := strings.Split(val, ":")
if len(parts) != 4 {
return errors.New("invalid checkin code format")
return errors.New("[Attendance Data] invalid checkin code format")
}
userIdStr := parts[1]

View File

@@ -87,5 +87,5 @@ func (self *Client) ValidateRedirectURI(redirectURI string) error {
return nil
}
}
return errors.New("redirect uri not match")
return errors.New("[Client Data] redirect uri not match")
}