diff --git a/credentials.go b/credentials.go index c4c19d3..1a9737a 100644 --- a/credentials.go +++ b/credentials.go @@ -92,8 +92,13 @@ func getCredentials(id, key string, profile string) (string, string) { } if !cfg.HasSection(profile) { - utils.ErrorAndExit(fmt.Sprintf("Could not find the profile [%s] within the Veracode credentials file. Do you need to specify the \"-profile xyz\" flag?. See https://docs.veracode.com/r/c_httpie_tool", profile), nil) + profileFlagHint := "" + if profile == "default" { + profileFlagHint = "Do you need to specify \"-profile xyz\"?. " + } + + utils.ErrorAndExit(fmt.Sprintf("Could not find the profile [%s] within the Veracode credentials file. %sSee https://docs.veracode.com/r/c_httpie_tool#using-multiple-profiles", profile, profileFlagHint), nil) } id = cfg.Section(profile).Key("veracode_api_key_id").String() diff --git a/data/api.go b/data/api.go index ef56d71..9629c55 100644 --- a/data/api.go +++ b/data/api.go @@ -74,7 +74,7 @@ func (api API) makeApiRequest(apiUrl, httpMethod string) []byte { } if resp.StatusCode == 403 { - utils.ErrorAndExit("This request was forbidden. Ensure you can view these scans within the Veracode Platform. For help contact your Veracode administrator and refer to https://docs.veracode.com/r/c_API_roles_details", nil) + utils.ErrorAndExit("This request was forbidden. Do you need to specify a profile \"-profile xyz\"?. Is this the right profile name to use?. Ensure you can view these scans within the Veracode Platform. For help contact your Veracode administrator and refer to https://docs.veracode.com/r/c_API_roles_details", nil) } if resp.StatusCode != http.StatusOK {