Skip to content

Commit

Permalink
Use the same error message everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
xkobal committed Sep 17, 2021
1 parent e546968 commit 286d023
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kritis/metadata/containeranalysis/containeranalysis.go
Expand Up @@ -125,7 +125,7 @@ func (c Client) Attestations(containerImage string, aa *kritisv1beta1.Attestatio
func (c Client) fetchVulnerabilityOccurrence(containerImage string, kind string) ([]*grafeas.Occurrence, error) {
// Make sure container image valid and is a GCR image
if !isValidImageOnGCP(containerImage) {
return nil, fmt.Errorf("%s is not a valid image hosted in GCR", containerImage)
return nil, fmt.Errorf("%s is not a valid image hosted in GCR or GAR", containerImage)
}

req := createListOccurrencesRequest(containerImage, kind)
Expand Down Expand Up @@ -257,7 +257,7 @@ func (c Client) CreateAttestationOccurrence(noteName string, containerImage stri
// UploadAttestationOccurrence uploads an Attestation occurrence for a given note, image and project.
func (c Client) UploadAttestationOccurrence(noteName string, containerImage string, att *attestlib.Attestation, proj string, sType metadata.SignatureType) (*grafeas.Occurrence, error) {
if !isValidImageOnGCP(containerImage) {
return nil, fmt.Errorf("%s is not a valid image hosted in GCR", containerImage)
return nil, fmt.Errorf("%s is not a valid image hosted in GCR or GAR", containerImage)
}

// Create occurrence from attestation
Expand Down

0 comments on commit 286d023

Please sign in to comment.