return error when connected gateway api /_framework/api/_info 404
This commit is contained in:
parent
cc9c49f884
commit
24e1c81d51
|
@ -295,6 +295,9 @@ func (h *GatewayAPI) doConnect(endpoint string, basicAuth gateway.BasicAuth) (*G
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if res.StatusCode == http.StatusNotFound {
|
||||||
|
return nil, fmt.Errorf("unknow gateway version")
|
||||||
|
}
|
||||||
b := res.Body
|
b := res.Body
|
||||||
gres := &GatewayConnectResponse{}
|
gres := &GatewayConnectResponse{}
|
||||||
err = json.Unmarshal(b, gres)
|
err = json.Unmarshal(b, gres)
|
||||||
|
|
Loading…
Reference in New Issue