Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Not handling errors correctly resulting in a NullPointerException #369

Closed
jan-bar opened this issue Oct 12, 2024 · 0 comments · Fixed by #370
Closed

[BUG]: Not handling errors correctly resulting in a NullPointerException #369

jan-bar opened this issue Oct 12, 2024 · 0 comments · Fixed by #370
Labels
bug Something isn't working

Comments

@jan-bar
Copy link
Contributor

jan-bar commented Oct 12, 2024

The error is shown in the figure below

image

The problem code is as follows, manifest may be nil when err != ManifestNotFound

vfox/internal/manager.go

Lines 135 to 142 in 65ee668

manifest, err := m.fetchPluginManifest(m.GetRegistryAddress(name + ".json"))
if errors.Is(err, ManifestNotFound) {
return nil, fmt.Errorf("[%s] not found in remote registry, please check the name", pterm.LightRed(name))
}
if err = m.Add(manifest.Name, manifest.DownloadUrl, ""); err != nil {
return nil, err
}

@jan-bar jan-bar added the bug Something isn't working label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant