You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2024/07/30 06:10:26 UTC

(dubbo-go) branch main updated: add codeUnimplemented code for triple handler (#2719)

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

liujun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/main by this push:
     new d69d453b9 add codeUnimplemented code for triple handler (#2719)
d69d453b9 is described below

commit d69d453b919ac3ec0d3e1eb1cfaef743d8786dde
Author: finalt <fi...@apache.org>
AuthorDate: Tue Jul 30 14:10:22 2024 +0800

    add codeUnimplemented code for triple handler (#2719)
---
 protocol/triple/triple_protocol/handler.go | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/protocol/triple/triple_protocol/handler.go b/protocol/triple/triple_protocol/handler.go
index 320d503aa..11e4b5ad1 100644
--- a/protocol/triple/triple_protocol/handler.go
+++ b/protocol/triple/triple_protocol/handler.go
@@ -16,7 +16,6 @@ package triple_protocol
 
 import (
 	"context"
-	"errors"
 	"fmt"
 	"net/http"
 )
@@ -366,7 +365,7 @@ func (h *Handler) ServeHTTP(responseWriter http.ResponseWriter, request *http.Re
 	// todo(DMwangnima): inspect ok
 	implementation, ok := h.implementations[getIdentifier(svcGroup, svcVersion)]
 	if !ok {
-		_ = connCloser.Close(errors.New("no implementation for " + svcVersion))
+		_ = connCloser.Close(errorf(CodeUnimplemented, "no implementation found for service group %s and service version %s", svcGroup, svcVersion))
 		return
 	}
 	_ = connCloser.Close(implementation(ctx, connCloser))