diff --git a/dctw/v1/core/core.go b/dctw/v1/core/core.go index e5314dd..d85607a 100644 --- a/dctw/v1/core/core.go +++ b/dctw/v1/core/core.go @@ -188,6 +188,9 @@ func (c *DctWServer) Request(_ context.Context, request DctWRequest, path string fmt.Printf("resp.body:%s\n", string(bodyBytes)) fmt.Printf("resp.headers:%+v\n", resp.Header) } + if resp.StatusCode != 200 { + return nil, fmt.Errorf("请求异常:%s", resp.Status) + } return bodyBytes, nil }