Skip to content

Commit

Permalink
add codeUnimplemented code for triple handler (#2719)
Browse files Browse the repository at this point in the history
  • Loading branch information
FinalT authored Jul 30, 2024
1 parent 8747aa9 commit d69d453
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions protocol/triple/triple_protocol/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package triple_protocol

import (
"context"
"errors"
"fmt"
"net/http"
)
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit d69d453

Please sign in to comment.