This is an automated email from the ASF dual-hosted git repository.

LinkinStars pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/answer.git

commit 7b5740c1b46c2c99906c83f7948b32dae12bd09e
Author: seiya <[email protected]>
AuthorDate: Thu Oct 15 13:14:56 2026 +0000

    return error on json.Marshal() fail (never happens)
---
 internal/repo/captcha/captcha.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/internal/repo/captcha/captcha.go b/internal/repo/captcha/captcha.go
index f8195c1a..800a0fd1 100644
--- a/internal/repo/captcha/captcha.go
+++ b/internal/repo/captcha/captcha.go
@@ -53,7 +53,7 @@ func (cr *captchaRepo) SetActionType(ctx context.Context, 
unit, actionType, conf
        value.Num = amount
        valueStr, err := json.Marshal(value)
        if err != nil {
-               return nil
+               return err
        }
        err = cr.data.Cache.SetString(ctx, cacheKey, string(valueStr), 
6*time.Minute)
        if err != nil {

Reply via email to