You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/10/19 06:44:14 UTC

[GitHub] [servicecomb-kie] little-cui commented on a change in pull request #223: when etcd connection fails, if wait is not empty, set the timeout to wait

little-cui commented on a change in pull request #223:
URL: https://github.com/apache/servicecomb-kie/pull/223#discussion_r731540142



##########
File path: server/resource/v1/kv_resource.go
##########
@@ -200,6 +202,16 @@ func (r *KVResource) List(rctx *restful.Context) {
 func returnData(rctx *restful.Context, request *model.ListKVRequest) {
 	revStr := rctx.ReadQueryParameter(common.QueryParamRev)
 	wait := rctx.ReadQueryParameter(common.QueryParamWait)
+	if wait != "" {
+		duration, err := time.ParseDuration(wait)
+		if err != nil {
+			return

Review comment:
       错误要返回客户端正确的错误码,WriteErrResponse(rctx, config.ErrInvalidParams, err.Error())




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org