Files
pmg/packagemanager/errors.go
T

33 lines
1.3 KiB
Go
Raw Normal View History

package packagemanager
import (
"github.com/safedep/dry/usefulerror"
"github.com/safedep/pmg/errcodes"
)
var (
ErrFailedToResolveVersion = usefulerror.NewUsefulError().
WithCode(errcodes.Network).
WithHumanError("Failed to resolve the requested package version.").
WithHelp("Check your network connection and try again.").
WithMsg("failed to resolve package version")
ErrFailedToParsePackage = usefulerror.NewUsefulError().
2026-05-24 12:46:06 +05:30
WithCode(errcodes.PackageParseFailed).
WithHumanError("The package data could not be processed.").
WithHelp("The package may be corrupted or in an unsupported format.").
WithMsg("failed to parse package")
ErrAuthorNotFound = usefulerror.NewUsefulError().
2026-05-24 12:46:06 +05:30
WithCode(errcodes.PackageAuthorNotFound).
WithHumanError("The package author information could not be found.").
WithHelp("This may be due to incomplete package metadata or network issues.").
WithMsg("author not found")
ErrGitHubRateLimitExceeded = usefulerror.NewUsefulError().
2026-05-24 12:46:06 +05:30
WithCode(errcodes.GitHubRateLimitExceeded).
WithHumanError("GitHub API rate limit has been exceeded.").
WithHelp("Wait for the rate limit to reset or configure authentication to increase your rate limit.").
WithMsg("github api rate limit exceeded")
)