mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Fleet GitOps: Update error message for FMA typo (#38328)
This commit is contained in:
parent
910b41eca3
commit
67b911e9a1
1 changed files with 8 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue