Skip to content

Commit

Permalink
Merge pull request #526 from Jougan-0/errorHandlingForEmptyChartUrlAn…
Browse files Browse the repository at this point in the history
…dPackageNotFound

Error handling for empty chart url and package not found
  • Loading branch information
leecalcote authored Jul 1, 2024
2 parents e00bcfa + 4b74e9f commit 979c876
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion generators/artifacthub/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (pkg AhPackage) GenerateComponents() ([]v1beta1.ComponentDefinition, error)
// TODO: Move this to the configuration

if pkg.ChartUrl == "" {
return components, ErrChartUrlEmpty("Artifacthub", pkg.Name)
return components, ErrChartUrlEmpty(pkg.Name, "ArtifactHub")
}
crds, err := manifests.GetCrdsFromHelm(pkg.ChartUrl)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion generators/artifacthub/package_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (ahpm ArtifactHubPackageManager) GetPackage() (models.Package, error) {
return nil, err
}
if len(pkgs) == 0 {
return nil, ErrNoPackageFound("Artifacthub", ahpm.PackageName)
return nil, ErrNoPackageFound(ahpm.PackageName, "Artifacthub")
}
// update package information
for i, ap := range pkgs {
Expand Down

0 comments on commit 979c876

Please sign in to comment.