return error when connected gateway api /_framework/api/_info 404

This commit is contained in:
liugq 2022-03-11 15:52:51 +08:00
parent cc9c49f884
commit 24e1c81d51
1 changed files with 3 additions and 0 deletions

View File

@ -295,6 +295,9 @@ func (h *GatewayAPI) doConnect(endpoint string, basicAuth gateway.BasicAuth) (*G
if err != nil {
return nil, err
}
if res.StatusCode == http.StatusNotFound {
return nil, fmt.Errorf("unknow gateway version")
}
b := res.Body
gres := &GatewayConnectResponse{}
err = json.Unmarshal(b, gres)