Changed the wording of error messages slightly

This commit is contained in:
David J. Allen 2024-05-08 13:39:51 -06:00
parent cc7bad8b94
commit 0403b2bcbc
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC
11 changed files with 31 additions and 32 deletions

View file

@ -45,13 +45,13 @@ func QueryScannedPorts() error {
url := makeEndpointUrl("/scanned_ports")
_, body, err := util.MakeRequest(nil, url, "GET", nil, nil)
if err != nil {
return fmt.Errorf("could not discover assets: %v", err)
return fmt.Errorf("failed todiscover assets: %v", err)
}
// get data from JSON
var res map[string]any
if err := json.Unmarshal(body, &res); err != nil {
return fmt.Errorf("could not unmarshal response body: %v", err)
return fmt.Errorf("failed tounmarshal response body: %v", err)
}
data := res["data"]