🎨 updated error handling logic

This commit is contained in:
landaiqing
2024-11-18 01:12:50 +08:00
parent 78a162a19a
commit 35d2da35b2
48 changed files with 395 additions and 170 deletions

View File

@@ -36,7 +36,7 @@ func (l *GenerateClientIdLogic) GenerateClientId(clientIP string) (resp *types.R
}
simpleUuid := kgo.SimpleUuid()
if err = l.svcCtx.RedisClient.SetEx(l.ctx, constant.UserClientPrefix+clientIP, simpleUuid, time.Hour*24*7).Err(); err != nil {
return response.Error(), err
return nil, err
}
return response.SuccessWithData(simpleUuid), nil
}