juzhiyuan commented on a change in pull request #1166:
URL: https://github.com/apache/apisix-dashboard/pull/1166#discussion_r550258339



##########
File path: api/internal/handler/route_online_debug/route_online_debug.go
##########
@@ -80,7 +81,8 @@ func DebugRequestForwarding(c droplet.Context) (interface{}, 
error) {
        if v, ok := protocolMap[requestProtocol]; ok {
                return v.RequestForwarding(c)
        } else {
-               return &data.SpecCodeResponse{StatusCode: 
http.StatusBadRequest}, fmt.Errorf("protocol unspported %s", 
paramsInput.RequestProtocol)
+               return &data.SpecCodeResponse{StatusCode: 
http.StatusBadRequest},
+                       fmt.Errorf("protocol unspported %s, need http or https. 
but given %s", paramsInput.RequestProtocol, paramsInput.RequestProtocol)

Review comment:
       ```suggestion
                        fmt.Errorf("Protocol unsupported %s, only http or https 
is allowed, but given %s", paramsInput.RequestProtocol, 
paramsInput.RequestProtocol)
   ```




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to