Merge pull request #1673 from kubescape/operator-command

Fixed return status code
This commit is contained in:
David Wertenteil
2024-04-30 15:55:27 +03:00
committed by GitHub
+4 -1
View File
@@ -83,7 +83,10 @@ func (a *OperatorAdapter) httpPostOperatorScanRequest(body apis.Commands) (strin
return "", err
}
defer resp.Body.Close()
return httputils.HttpRespToString(resp)
if resp.StatusCode != 200 {
return "", fmt.Errorf("http-error: %d", resp.StatusCode)
}
return "success", nil
}
func (a *OperatorAdapter) OperatorScan() (string, error) {