Skip to content

Commit

Permalink
cdn: wrap errors for backendbucket, dont return on not found
Browse files Browse the repository at this point in the history
Co-authored-by: Carl Hedgren <[email protected]>
  • Loading branch information
tronghn and Reasonable-Solutions committed Feb 14, 2024
1 parent be59617 commit 78dea31
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/reconcilers/google/cdn/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,13 @@ func (r *cdnReconciler) getOrCreateBackendBucket(ctx context.Context, naisTeam *
if errors.As(err, &gapiError) {
// retry transient errors
if gapiError.Code != http.StatusNotFound {
return nil, err
return nil, fmt.Errorf("googleapi error: %w", err)
}

needsBackendBucket = true
} else {
return nil, fmt.Errorf("unknown error: %w", err)
}
return nil, err
}

if !needsBackendBucket {
Expand Down

0 comments on commit 78dea31

Please sign in to comment.