Skip to content

Commit

Permalink
Merge pull request #3378 from cloudfoundry/propagate-error-on-get-domain
Browse files Browse the repository at this point in the history
Do not return forbidden error on get domain failure
  • Loading branch information
georgethebeatle committed Jul 11, 2024
2 parents 1b1ecab + 65b3f51 commit 861882f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/repositories/domain_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (r *DomainRepo) GetDomain(ctx context.Context, authInfo authorization.Info,
domain := &korifiv1alpha1.CFDomain{}
err = userClient.Get(ctx, client.ObjectKey{Namespace: ns, Name: domainGUID}, domain)
if err != nil {
return DomainRecord{}, apierrors.NewForbiddenError(err, DomainResourceType)
return DomainRecord{}, fmt.Errorf("get-domain failed: %w", apierrors.FromK8sError(err, DomainResourceType))
}

return cfDomainToDomainRecord(domain), nil
Expand Down

0 comments on commit 861882f

Please sign in to comment.