Skip to content

Commit 979c876

Browse files
authored
Merge pull request #526 from Jougan-0/errorHandlingForEmptyChartUrlAndPackageNotFound
Error handling for empty chart url and package not found
2 parents e00bcfa + 4b74e9f commit 979c876

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

generators/artifacthub/package.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (pkg AhPackage) GenerateComponents() ([]v1beta1.ComponentDefinition, error)
4141
// TODO: Move this to the configuration
4242

4343
if pkg.ChartUrl == "" {
44-
return components, ErrChartUrlEmpty("Artifacthub", pkg.Name)
44+
return components, ErrChartUrlEmpty(pkg.Name, "ArtifactHub")
4545
}
4646
crds, err := manifests.GetCrdsFromHelm(pkg.ChartUrl)
4747
if err != nil {

generators/artifacthub/package_manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func (ahpm ArtifactHubPackageManager) GetPackage() (models.Package, error) {
1818
return nil, err
1919
}
2020
if len(pkgs) == 0 {
21-
return nil, ErrNoPackageFound("Artifacthub", ahpm.PackageName)
21+
return nil, ErrNoPackageFound(ahpm.PackageName, "Artifacthub")
2222
}
2323
// update package information
2424
for i, ap := range pkgs {

0 commit comments

Comments
 (0)