Fleet GitOps: Update error message for FMA typo (#38328)

This commit is contained in:
RachelElysia 2026-01-15 15:48:58 -05:00 committed by GitHub
parent 910b41eca3
commit 67b911e9a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2001,6 +2001,14 @@ func (svc *Service) softwareInstallerPayloadFromSlug(ctx context.Context, payloa
app, err := svc.ds.GetMaintainedAppBySlug(ctx, *slug, teamID)
if err != nil {
// Return user-friendly message for generic not found error
if fleet.IsNotFound(err) {
// Must return low-level error in order to be properly handled upstream
return fleet.NewUserMessageError(
fmt.Errorf("%s isn't a supported Fleet-maintained app. See supported apps: https://fleetdm.com/learn-more-about/supported-fleet-maintained-app-slugs", *slug),
http.StatusNotFound,
)
}
return err
}
_, err = maintained_apps.Hydrate(ctx, app)