Ks8/Folders: Fix status codes returned on GET (#101237)
return the correct status code for folder fetching failures
This commit is contained in:
@@ -142,7 +142,8 @@ func (s *legacyStorage) Get(ctx context.Context, name string, options *metav1.Ge
|
||||
if errors.Is(err, dashboards.ErrFolderNotFound) || err == nil {
|
||||
err = resourceInfo.NewNotFound(name)
|
||||
}
|
||||
return nil, err
|
||||
statusErr := apierrors.ToFolderStatusError(err)
|
||||
return nil, &statusErr
|
||||
}
|
||||
|
||||
r, err := convertToK8sResource(dto, s.namespacer)
|
||||
|
||||
Reference in New Issue
Block a user